Moorcheh
Moorcheh is a lightning-fast semantic search engine and vector store. Instead of using simple distance metrics like L2 or Cosine, Moorcheh uses Maximally Informative Binarization (MIB) and Information-Theoretic Score (ITS) to retrieve accurate document chunks. The following tutorial will allow you to use Moorcheh and LangChain to upload and store text documents and vector embeddings as well as retrieve relevant chunks for all of your queries.Setup
First, install the necessary package:Initialization
Get started with Moorcheh- Sign up or log in at the Moorcheh Console.
- Go to the “API Keys” tab and generate an API key.
- Save the key as an environment variable named
MOORCHEH_API_KEY(you’ll use it below). - To create a namespace for storing data:
- In the Console, open the “Namespaces” tab and click “Create namespace”; or
- Initialize it programmatically using the vector store code in the next section.
- Use your API key to create namespaces, upload documents, and retrieve answers.
Importing Packages
Import the below packages:Code Setup
Set your Moorcheh API Key in your environment variables:Adding Documents
Delete Documents
Query Engine
Once your namespace has been created and you have uploaded documents into it, you can ask queries about the documents directly through the vector store. Set the query and LLM you would like to answer your query. For more information on supported LLMs, please visit our Github page.Further Resources
For more information about Moorcheh, feel free to visit the resources below:Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.