{"componentChunkName":"component---src-components-post-post-tsx","path":"/articles/rag-with-vector-databases","result":{"data":{"site":{"siteMetadata":{"url":"https://www.01binary.us"}},"post":{"slug":"rag-with-vector-databases","body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Retrieval Augmented Generation with Vector Databases\",\n  \"description\": \"Introduction to Retrieval Augmented Generation (RAG) using popular Vector databases like Chroma and Pinecone\",\n  \"image\": \"./images/theory-of-consciousness.png\",\n  \"author\": \"Valeriy Novytskyy\",\n  \"date\": \"2026-11-18T00:00:00.000Z\",\n  \"location\": \"^H Hackerspace\",\n  \"tags\": [\"engineering-software\"]\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", null, \"overview\"), mdx(\"p\", null, \"This tutorial will walk you through creating a search index for a collection of documents by using a vector database, and then using \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.ibm.com/think/topics/retrieval-augmented-generation\"\n  }, \"Retrieval Augmented Generation\"), \" (RAG) to build a chat bot that uses this database to answer questions.\"), mdx(\"p\", null, \"While vector databases are useful on their own for indexing a collection of documents, combining this machine learning technique with generative AI provides agents with \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"long-term memory\"), \", expanding their capabilities.\"), mdx(\"p\", null, \"This hands-on tutorial is designed to help you integrate Retrieval Augmented Generation into your application as quickly as possible. For a deeper introduction checkout \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.amazon.com/Vector-Databases-Generative-AI-Build-ebook/dp/B0FH35DYNJ\"\n  }, \"Vector Databases for Generative AI\"), \" by Leandro Calado.\"), mdx(\"h2\", null, \"why vector database?\"), mdx(\"p\", null, \"Anyone implementing full-text search has to think about:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Tokenizing\"), \", or breaking the search criteria into separate search terms, which is typically done by splitting the text a user typed into a search box by white-space and punctuation characters.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Sub-string matching\"), \", so that a query term like \\u201Creal\\u201D matches \\u201Crealize\\u201D.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Stemming\"), \", or transforming words into their most basic versions so that a query like \\u201Crunning\\u201D also matches documents containing \\u201Cruns\\u201D or \\u201Crun\\u201D.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Stop words\"), \", or common words like \\u201Cthe\\u201D, \\u201Cand\\u201D, \\u201Cfor\\u201D that must be filtered from the query to avoid matching every document.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Similarity\"), \", or matching by meaning rather than exact words (\\u201Crun\\u201D - \\u201Csprint\\u201D), which is usually done by loading a thesaurus for the target language.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Ranking\"), \", or evaluating each maching document against the entire search criteria, usually based on how many of the terms match and their frequency in the document.\")), mdx(\"p\", null, \"While a home-made search engine that uses tokenizing and sub-string matching is often sufficient for a personal blog or a hobby app, deployment at scale requires the intuitiveness of stemming, similarity matching, and ranking to meet varied needs of many users.\"), mdx(\"p\", null, \"These advanced features were only supported by enterprise search engines like \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.elastic.co/search-labs/blog/lexical-and-semantic-search-with-elasticsearch\"\n  }, \"Elasticsearch\"), \" until recently, requiring costly solutions like always-running virtual machines.\"), mdx(\"p\", null, \"The newer open-source vector databases like \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/qdrant/qdrant\"\n  }, \"Qdrant\"), \" and \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/chroma-core/chroma\"\n  }, \"Chroma\"), \" were built on the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://huggingface.co/learn/llm-course/chapter1/4\"\n  }, \"Transformer\"), \" architecture by using \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.ibm.com/think/topics/vector-embedding\"\n  }, \"Embedding\"), \" layers for converting text and images into numbers that neural networks can process, re-using the same mechanism for similarity search, and adding common database operations like inserts and queries.\"), mdx(\"p\", null, \"This technology spawned many affordable serverless solutions with free tiers and pricing based on usage, bringing advanced full-text search within the grasp of hobbyists and lean startups.\"), mdx(\"h2\", null, \"selecting a database\"), mdx(\"p\", null, \"A survey of popular vector databases reveals the following:\"), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Solution\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Deployment\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Storage\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Usage Limits\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://www.trychroma.com/\"\n  }, \"Chroma\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"Local\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"Serverless\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"1 GB\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"strong\", {\n    parentName: \"td\"\n  }, \"Low Cost\"), \": \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"1T\"), \" transfer \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"$5\"), \" / month\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://www.pinecone.io/\"\n  }, \"Pinecone\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"Serverless\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"2 GB\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"strong\", {\n    parentName: \"td\"\n  }, \"Free\"), \": \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"1M\"), \" read + \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"2M\"), \" writes / month\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://qdrant.tech/cloud/\"\n  }, \"Qdrant\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"Local\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"VM\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"4 GB\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"strong\", {\n    parentName: \"td\"\n  }, \"Free\"), \": \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"0.5\"), \" vCPU, unlimited requests\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://upstash.com/\"\n  }, \"Upstash\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"Serverless\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"2 GB\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"strong\", {\n    parentName: \"td\"\n  }, \"Free\"), \": \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"10K\"), \" queries + \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"10K\"), \" updates / day\")))), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Qdrant\"), \" and \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Chroma\"), \" databases are open-source and can be operated locally or in the cloud while \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Pinecone\"), \" and \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Upstash\"), \" only run in the cloud and therefore require an API key.\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Pinecone\"), \" is a better choice for unattended deployments, such as a personal blog or an app. Unlike Qdrant which \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://qdrant.tech/documentation/cloud/create-cluster\"\n  }, \"shuts down inactive virtual machine clusters\"), \", Pinecone is \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"serverless\"), \" and spins up virtual machines on request.\"), mdx(\"h2\", null, \"using a vector database\"), mdx(\"p\", null, \"Indexing with a vector database involves:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Chunking\"), \" and \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"encoding\"), \" a collection of documents\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Creating a database and inserting the encoded vectors\")), mdx(\"p\", null, \"The next few sections will demonstrate how to setup a \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Chroma\"), \" database locally, use it for indexing documents, retrieve documents based on a search criteria, and ochestrate Retrieval Augmented Generation with a locally running model in \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://lmstudio.ai/\"\n  }, \"LM Studio\"), \".\"), mdx(\"p\", null, \"The same steps are then repeated with a hosted \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Pinecone\"), \" database to prepare you for deploying your solution to production.\"), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"The Python code snippets in this tutorial are from the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector\"\n  }, \"vector\"), \" companion repository included with this tutorial. The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"main\"), \" branch contains the code for using \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Chroma\"), \" database locally, and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"pinecone\"), \" branch contains the code for using the serverless \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Pinecone\"), \" database with an API key.\")), mdx(\"h2\", null, \"chunking documents\"), mdx(\"p\", null, \"Indexing a document requires feeding it through an encoder-only neural network implemented with the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://huggingface.co/learn/llm-course/chapter1/4\"\n  }, \"Transformer architecture\"), \".\"), mdx(\"p\", null, \"A very small model is typically used for this purpose, such as the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2\"\n  }, \"all-MiniLM-L6-v2\"), \". Unlike a generative LLM, this model produces a 384-dimensional embedding vector instead of text.\"), mdx(\"p\", null, \"Since \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Transformer\"), \"-based neural networks have a limited context window and cannot process arbitrarily large documents, the documents are split into bite-sized passages called \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"chunks\"), \".\"), mdx(\"p\", null, \"Chunking also aids retrieval, allowing us to return the \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"matching passage\"), \" instead of the entire document, which is a lot friendlier for the users.\"), mdx(\"p\", null, \"The simplest chunking method is splitting each document into equal size chunks with some overlap. The overlap helps when the split happens mid-sentence:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"# Split a document into chunks\\ndef chunk_text(text, size=500, overlap=100):\\n    step = size - overlap\\n\\n    for start in range(0, len(text), step):\\n        chunk = text[start:start + size]\\n\\n        if chunk.strip():\\n            yield chunk\\n\")), mdx(\"h2\", null, \"embedding\"), mdx(\"p\", null, \"The chunks are then sent to the \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"embedding model\"), \" to transform text into embedding vectors. In this tutorial we use \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2\"\n  }, \"all-MiniLM-L6-v2\"), \" from Hugging Face:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"# Load embedding model\\nfrom sentence_transformers import SentenceTransformer\\nmodel = SentenceTransformer(\\\"all-MiniLM-L6-v2\\\")\\n\")), mdx(\"p\", null, \"The model is automatically loaded by the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://sbert.net/\"\n  }, \"SentenceTransformer\"), \" Python package:\"), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"Sentence Transformers (a.k.a. SBERT) is the go-to Python module for using and training state-of-the-art embedding and reranker models and unlocks a wide range of applications, including semantic search, semantic textual similarity, and paraphrase mining.\")), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector/blob/main/index.py\"\n  }, \"indexing script\"), \" included in the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector\"\n  }, \"companion repository\"), \" loads all markdown files in the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector/tree/main/documents\"\n  }, \"/documents\"), \" folder, splits them into chunks, and encodes each chunk into an array of vectors:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"# Chunk all markdown documents\\nfrom pathlib import Path\\n\\nfor path in sorted(Path(\\\"documents\\\").rglob(\\\"*.md\\\")):\\n    text = path.read_text(encoding=\\\"utf-8\\\")\\n\\n    chunks = list(chunk_text(text))\\n\\n    if not chunks:\\n        continue\\n\\n    # Convert chunks to vectors\\n    vectors = model.encode(chunks).tolist()\\n\")), mdx(\"h2\", null, \"indexing\"), mdx(\"p\", null, \"All that remains is to insert a list of vectors for each chunk into the database, and record some \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"metadata\"), \" about each chunk, such as the name of the document where its content originated.\"), mdx(\"p\", null, \"The Chroma database is created in the same folder as the script by using the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://pypi.org/project/chromadb/\"\n  }, \"chromadb\"), \" Python package:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"# Create index database and collection\\nimport chromadb\\n\\ndb = chromadb.PersistentClient(path=\\\"./database\\\")\\ncollection = db.get_or_create_collection(\\\"documents\\\")\\n\")), mdx(\"p\", null, \"The encoded array of vectors for each chunk is inserted into the database:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"# Store vectors and source text\\ncollection.upsert(\\n    ids=[f\\\"{path}:{i}\\\" for i in range(len(chunks))],\\n    embeddings=vectors,\\n    documents=chunks,\\n    metadatas=[{\\\"source\\\": str(path)} for _ in chunks],\\n)\\n\")), mdx(\"p\", null, \"After following the instructions in \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector/blob/main/README.md\"\n  }, \"readme\"), \" for the companion repository, you will see the Chroma database created in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/database\"), \" folder. This includes a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".sqlite\"), \" database that can be opened in a tool like \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://dbeaver.io/\"\n  }, \"DBeaver\"), \" as well as some additional files.\"), mdx(\"h2\", null, \"retrieval\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector/blob/main/search.py\"\n  }, \"retrieval script\"), \" included in the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector\"\n  }, \"companion repository\"), \" queries the same Chroma database created in the previous step:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"# Text to search for\\nquery = \\\"psychology\\\"\\n\\n# Load vector database\\nimport chromadb\\ndb = chromadb.PersistentClient(path=\\\"./database\\\")\\ncollection = db.get_or_create_collection(\\\"documents\\\")\\n\\n# Load embedding model\\nfrom sentence_transformers import SentenceTransformer\\nmodel = SentenceTransformer(\\\"all-MiniLM-L6-v2\\\")\\n\\n# Encode query text into vectors\\nvectors = model.encode(query).tolist()\\n\\n# Find matching vectors\\nresults = collection.query(\\n    query_embeddings=[vectors],\\n    n_results=5,\\n    include=[\\\"documents\\\", \\\"metadatas\\\"],\\n)\\n\")), mdx(\"p\", null, \"The results are then printed to the output. This script can be piped into a file to conveniently view the results as markdown:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"python ./search.py > results.md\\n\")), mdx(\"h2\", null, \"serverless database\"), mdx(\"p\", null, \"Using a local database like \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Chroma\"), \" lets you experience vector databases first-hand, without hiding too many implementation details behind a cloud service.\"), mdx(\"p\", null, \"Indexing with a cloud service like \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Pinecone\"), \" works much the same way. Cloud providers often integrate other related operations like embedding directly into their service, which lets us skip this step.\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector/blob/pinecone/index.py\"\n  }, \"indexing script\"), \" included on \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector/tree/pinecone\"\n  }, \"pinecone\"), \" branch of the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector\"\n  }, \"companion repository\"), \" looks very much like the Chroma script, but uses the Pinecone SDK, with API key set as an environment variable:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"export PINECONE_API_KEY=\\\"your-api-key\\\"\\n\")), mdx(\"p\", null, \"The chunks are then uploaded to Pinecone in the same indexing loop:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"# Index documents with Pinecone\\nfrom hashlib import sha256\\nfrom pathlib import Path\\n\\n# For each document\\nfor path in sorted(Path(\\\"documents\\\").rglob(\\\"*.md\\\")):\\n    # Split into chunks\\n    chunks = list(chunk_text(path.read_text(encoding=\\\"utf-8\\\")))\\n\\n    if not chunks:\\n        continue\\n\\n    # Calculate checksum\\n    path_id = sha256(str(path).encode(\\\"utf-8\\\")).hexdigest()\\n\\n    # Upload to Pinecone\\n    result = index.documents.batch_upsert(\\n        namespace=\\\"documents\\\",\\n        documents=[\\n            {\\\"_id\\\": f\\\"{path_id}:{i}\\\", \\\"text\\\": chunk, \\\"source\\\": str(path)}\\n            for i, chunk in enumerate(chunks)\\n        ]\\n    )\\n\")), mdx(\"h2\", null, \"rag\"), mdx(\"p\", null, \"Once the documents are indexed, all that remains is orchestrating the user\\u2019s interaction with the chat LLM. This involves transforming their question into embedding vectors, querying the database, and injecting the search results (chunk contents and source file names) into the prompt.\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector/blob/main/rag.py\"\n  }, \"Retrieval Augmented Generation script\"), \" in the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector\"\n  }, \"companion repository\"), \" then talks to a local LLM running in \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://lmstudio.ai/\"\n  }, \"LM Studio\"), \", providing a \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector/blob/main/SYSTEM_PROMPT.md\"\n  }, \"System Prompt\"), \" and injecting the retrieved chunks into the User Prompt.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"# Connect to Chroma database\\nimport chromadb\\n\\ndb = chromadb.PersistentClient(path=\\\"./database\\\")\\ncollection = db.get_collection(\\\"documents\\\")\\n\\n# Load embedding model\\nfrom sentence_transformers import SentenceTransformer\\nembedding_model = SentenceTransformer(\\\"all-MiniLM-L6-v2\\\")\\n\\n# Load chat model\\nfrom openai import OpenAI\\nchat_model = OpenAI(\\n  base_url=\\\"http://127.0.0.1:1234/v1\\\",\\n  api_key=\\\"lm-studio\\\"\\n)\\n\\n# Input\\nquestion = input(\\\"Question or topic: \\\").strip()\\n\\n# Embed\\nvector = embedding_model.encode(question).tolist()\\n\\n# Retrieve\\nresults = collection.query(\\n  query_embeddings=[vector],\\n  n_results=3,\\n  include=[\\\"documents\\\", \\\"metadatas\\\"]\\n)\\n\\n# Assemble\\ncontext = \\\"\\\\n\\\\n\\\".join(\\n  f\\\"Source: {metadata['source']}\\\\n{text}\\\"\\n\\n  for text, metadata in zip(\\n    results[\\\"documents\\\"][0],\\n    results[\\\"metadatas\\\"][0],\\n  )\\n)\\n\\n# Load system prompt\\nfrom pathlib import Path\\nsystem_prompt = Path(__file__).with_name(\\\"SYSTEM_PROMPT.md\\\").read_text(encoding=\\\"utf-8\\\").strip()\\n\\n# Output\\nresponse = chat_model.chat.completions.create(\\n    model=\\\"google/gemma-3-12b\\\",\\n    messages=[\\n        {\\n            \\\"role\\\": \\\"system\\\",\\n            \\\"content\\\": system_prompt,\\n        },\\n        {\\n            \\\"role\\\": \\\"user\\\",\\n            \\\"content\\\": (\\n                f\\\"Question or topic: {question}\\\\n\\\\n\\\"\\n                f\\\"Document excerpts:\\\\n{context}\\\"\\n            ),\\n        },\\n    ],\\n)\\n\\nprint(response.choices[0].message.content)\\n\")), mdx(\"p\", null, \"Not surprisingly, the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/01binary/vector/blob/pinecone/rag.py\"\n  }, \"same script\"), \" on the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"pinecone\"), \" branch of the companion repository only differs in the simplicity resulting from using an integrated online service:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"# Load chat model\\nfrom openai import OpenAI\\nchat_model = OpenAI(\\n  base_url=\\\"http://127.0.0.1:1234/v1\\\",\\n  api_key=\\\"lm-studio\\\"\\n)\\n\\n# Input\\nquestion = input(\\\"Question or topic: \\\").strip()\\n\\n# Retrieve\\nfrom pinecone import EmbedQuery, Pinecone\\n\\nresults = Pinecone().index(\\\"vector\\\").documents.search(\\n  namespace=\\\"documents\\\",\\n  top_k=3,\\n  score_by=[EmbedQuery(field=\\\"text\\\", query=question)],\\n  include_fields=[\\\"text\\\", \\\"source\\\"],\\n)\\n\\n# Assemble\\ncontext = \\\"\\\\n\\\\n\\\".join(\\n  f\\\"Source: {match.source}\\\\n{match.text}\\\" for match in results.matches\\n)\\n\\n# Load system prompt\\nfrom pathlib import Path\\nsystem_prompt = Path(__file__).with_name(\\\"SYSTEM_PROMPT.md\\\").read_text(encoding=\\\"utf-8\\\").strip()\\n\\n# Output\\nresponse = chat_model.chat.completions.create(\\n    model=\\\"google/gemma-3-12b\\\",\\n    messages=[\\n        {\\n            \\\"role\\\": \\\"system\\\",\\n            \\\"content\\\": system_prompt,\\n        },\\n        {\\n            \\\"role\\\": \\\"user\\\",\\n            \\\"content\\\": (\\n                f\\\"Question or topic: {question}\\\\n\\\\n\\\"\\n                f\\\"Document excerpts:\\\\n{context}\\\"\\n            ),\\n        },\\n    ],\\n)\\n\\nprint(response.choices[0].message.content)\\n\")), mdx(\"h2\", null, \"closing\"), mdx(\"p\", null, \"In this tutorial we\\u2019ve looked at using modern, open-source vector databases to easily replicate what used to be hours of work in setting up a complex deployment like Elasticsearch, or using advanced algorithms like \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.elastic.co/blog/practical-bm25-part-2-the-bm25-algorithm-and-its-variables\"\n  }, \"BM25\"), \" to roll your own full-text search.\"), mdx(\"p\", null, \"This sample code in this tutorial can be run on most Mac and Windows computers using a local vector database called \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Chroma\"), \".\"), mdx(\"p\", null, \"For practical deployment in production, the code can be easily adopted to \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Pinecone\"), \", an online serverless vector database with a generous free tier that doesn\\u2019t ask for a credit card, making it a good choice for prototypes and personal projects.\"));\n}\n;\nMDXContent.isMDXComponent = true;","timeToRead":5,"frontmatter":{"title":"Retrieval Augmented Generation with Vector Databases","description":"Introduction to Retrieval Augmented Generation (RAG) using popular Vector databases like Chroma and Pinecone","image":{"childImageSharp":{"fluid":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAAAsTAAALEwEAmpwYAAACOklEQVQozy2RX0hTcRTHv7v3pvvTbGMrUyGo3nqNXvoHRpgDJwlWREQmtmKUf9F0lcZyNHJbudofV2u6Nc1Js+ZtQk5BEdIyM9bmXW2z2T+hxJegh4Jfd9KB83K+nA/n8AHHcRTfDLfI0bF4jCGECL44WSZNCKzFdtScdSJbgh2FlL7psmi82SQM2Howax/CEfJjPeMSH5BKLyGZSu/CfyAdj8fpr8kMs729XBDSGGTTJ62SS2obdaV5hu44b5V33+pS2qx38xeaugu+Vxo2vTI9kgjJNA4fLM4Zj0zkZJY/C3nggXVgIpFg5l7PZa+jGzs6hY7mdumMzpffW+ffamgNbXGe6cuL6VzKYDgs/HSjd2NSa5IG+4aUBl9IzO8gtZwpSqaXdvNAJbIDbWsjSktUjFgEerIzIPYPPik0u4YVpptPZfq2UMFAw6Bo1uYT33f2bCbRVbzZeQz9g57cbh9b5DO+EPulNdTS6gpSyRQQrr2D/j1VILc5eNtcEqumX2F0sIr6yVHm+NUQDZjRW2cHiaxh7/59uUfL1LmEnofvQRjuZxGxv4uVj110y2PmgDK99o1CvEKPaLWFGj11T+JpCOR1XnsuXyFvUf+QRaV+BNuEDnhrPfjjiuDCOQ0OlZYgM/wYeq0dxoER/CI/qeyXXOojzYsV4C/5jajOIxs7YREZq700656gs+ZaLEHojCNoaQ2i6vR1qNUVUKlUKCtXY3pqFgvvFsFOvcT7aGxDbD5K8TCG9yH4B8mkC2PU0Ln4AAAAAElFTkSuQmCC","aspectRatio":2.742857142857143,"src":"/static/e1cdf3f3f89755cdb7d598c68af44f6d/79420/theory-of-consciousness.png","srcSet":"/static/e1cdf3f3f89755cdb7d598c68af44f6d/2481b/theory-of-consciousness.png 192w,\n/static/e1cdf3f3f89755cdb7d598c68af44f6d/1da6e/theory-of-consciousness.png 384w,\n/static/e1cdf3f3f89755cdb7d598c68af44f6d/79420/theory-of-consciousness.png 768w,\n/static/e1cdf3f3f89755cdb7d598c68af44f6d/497d3/theory-of-consciousness.png 1152w,\n/static/e1cdf3f3f89755cdb7d598c68af44f6d/e022e/theory-of-consciousness.png 1536w,\n/static/e1cdf3f3f89755cdb7d598c68af44f6d/99a22/theory-of-consciousness.png 2142w","sizes":"(max-width: 768px) 100vw, 768px"}}},"author":"Valeriy Novytskyy","relativeDate":"a day ago","date":"Nov 18, 2026","location":"^H Hackerspace","tags":["engineering-software"]},"fields":{"url":"/articles/rag-with-vector-databases/","collection":"articles","subCollection":null,"tags":["engineering-software"]},"headings":[{"value":"overview","depth":2},{"value":"why vector database?","depth":2},{"value":"selecting a database","depth":2},{"value":"using a vector database","depth":2},{"value":"chunking documents","depth":2},{"value":"embedding","depth":2},{"value":"indexing","depth":2},{"value":"retrieval","depth":2},{"value":"serverless database","depth":2},{"value":"rag","depth":2},{"value":"closing","depth":2}]},"project":null,"tagGroups":{"group":[{"tag":"bookreview","totalCount":4},{"tag":"design-graphic","totalCount":2},{"tag":"design-industrial","totalCount":2},{"tag":"engineering-architecture","totalCount":1},{"tag":"engineering-electrical","totalCount":2},{"tag":"engineering-mechanical","totalCount":1},{"tag":"engineering-robotics","totalCount":3},{"tag":"engineering-software","totalCount":11},{"tag":"fp","totalCount":2},{"tag":"philosophy","totalCount":3},{"tag":"physics","totalCount":2},{"tag":"production","totalCount":2},{"tag":"signal","totalCount":2},{"tag":"tool-aftereffects","totalCount":1},{"tag":"tool-arduino","totalCount":2},{"tag":"tool-blender","totalCount":2},{"tag":"tool-cpp","totalCount":4},{"tag":"tool-illustrator","totalCount":1},{"tag":"tool-js","totalCount":1},{"tag":"tool-matlab","totalCount":3},{"tag":"tool-premiere","totalCount":1},{"tag":"tool-raspi","totalCount":1}]},"logs":{"nodes":[]},"images":{"edges":[{"node":{"original":{"src":"/static/blank-25bb876fead6a32c95ee0a2bebac36e5.png","width":960,"height":510}}},{"node":{"original":{"src":"/static/icon-69ef0f99e2367f4258dc0a6d0db98638.png","width":460,"height":460}}},{"node":{"original":{"src":"/static/microsoft-auth-process-e5f77055ef19cdd63231b42a23a3de68.png","width":1641,"height":680}}},{"node":{"original":{"src":"/static/360-camera-ab95d3caa7f5bc22b354498193beece3.jpg","width":960,"height":720}}},{"node":{"original":{"src":"/static/ai-integration-autoscaling-fa8acb3f32ce510fa6723afaab3d2e5a.png","width":1908,"height":382}}},{"node":{"original":{"src":"/static/ai-integration-token-29060f2d69398665642ea0866955a4e7.png","width":1662,"height":298}}},{"node":{"original":{"src":"/static/blank-25bb876fead6a32c95ee0a2bebac36e5.png","width":960,"height":510}}},{"node":{"original":{"src":"/static/inverse-kinematics-atan2-app-091086db3a10c3591948dc03f037f487.png","width":1915,"height":1096}}},{"node":{"original":{"src":"/static/inverse-kinematics-atan2-e4a14dc81542c70751a96a4a28573d40.png","width":1773,"height":765}}},{"node":{"original":{"src":"/static/inverse-kinematics-gradient-f7699e9132866b980d18242c58303444.png","width":1834,"height":494}}},{"node":{"original":{"src":"/static/inverse-kinematics-law-of-cosines-51d9f60e408d4886b7cb80e4a71acf4f.png","width":2333,"height":790}}},{"node":{"original":{"src":"/static/kalman-covariance2x2-40cc672b43271889884a3bd0406218e1.png","width":1434,"height":504}}},{"node":{"original":{"src":"/static/kalman-prediction-68359f50e5a8c19c2c2be28dadb468ff.png","width":2180,"height":848}}},{"node":{"original":{"src":"/static/kalman-rate-mismatch-dc4184f96c7c96c6fd4661733fd2d2e2.png","width":2099,"height":1119}}},{"node":{"original":{"src":"/static/kalman-simulation-0f511d290500813e38d14ae671978206.png","width":1647,"height":1241}}},{"node":{"original":{"src":"/static/model-of-human-mind-nuke-nodes-5cfae8349e1b420875b47026f3122cd8.png","width":925,"height":931}}},{"node":{"original":{"src":"/static/pid-control-characteristics-e5187e37776875d548812ef35d6eefe4.png","width":2282,"height":864}}},{"node":{"original":{"src":"/static/pid-delay-b4b0a723495b325313bb74e0ef4e218e.png","width":2293,"height":655}}},{"node":{"original":{"src":"/static/pid-envelope-a865cf8c1a6340af56677ea214fe5f5f.png","width":2296,"height":968}}},{"node":{"original":{"src":"/static/pid-equation-overview-27b60f24fc2a1392b914aed59e2056e9.png","width":1720,"height":475}}},{"node":{"original":{"src":"/static/pid-instability-82dbe73d841c7f3183e9bceac44c1214.png","width":2113,"height":655}}},{"node":{"original":{"src":"/static/pid-kd-term-68bde17c55023c446642a1645ccf3092.png","width":2102,"height":722}}},{"node":{"original":{"src":"/static/pid-ki-term-7f54879402993469acaf3727423fafd1.png","width":2166,"height":722}}},{"node":{"original":{"src":"/static/pid-kp-term-5a2a1cd5338640f40a85a90302fb339a.png","width":2012,"height":718}}},{"node":{"original":{"src":"/static/pid-model-predictive-control-648f0cfffdf01986d1666d16b79d3987.png","width":1980,"height":1028}}},{"node":{"original":{"src":"/static/pid-steady-state-f80a09dea36e8ad946db5c308666fd01.png","width":2293,"height":655}}},{"node":{"original":{"src":"/static/pid-sys-id-app-93147d72fbef7c41dd89a6ed5def02a0.png","width":1268,"height":206}}},{"node":{"original":{"src":"/static/pid-tuner-app-matlab-toolbar-3bc06115fa7d17da53133434971efbc8.png","width":1272,"height":252}}},{"node":{"original":{"src":"/static/pid-what-is-derivative-82522fe572a2a31b201bb47547dbc935.png","width":2188,"height":890}}},{"node":{"original":{"src":"/static/pid-windup-9269a8316b87f84ee0e60f523eebb203.png","width":2113,"height":655}}},{"node":{"original":{"src":"/static/what-they-dont-jk-46d431d41556229c8fd63a3c39a9f1d9.jpeg","width":128,"height":128}}},{"node":{"original":{"src":"/static/ai-integration-input-path-fbdd680e8467d3e65125a9de2112fd3b.png","width":998,"height":754}}},{"node":{"original":{"src":"/static/ai-integration-timeline-84901a32a56eba8e37ebaa4eed472d18.png","width":1900,"height":608}}},{"node":{"original":{"src":"/static/ai-integration-upload-sidebar-3dd1a4b8066c6af96127cefd42ea4266.png","width":1038,"height":882}}},{"node":{"original":{"src":"/static/data-driven-graphics-a24d3280aa41464d6eaf78eb85139aff.png","width":2003,"height":731}}},{"node":{"original":{"src":"/static/inverse-kinematics-bias-angle-7bbfc7753ff6217b0fa15c6c1f5c91fd.png","width":2196,"height":1314}}},{"node":{"original":{"src":"/static/inverse-kinematics-law-of-cosines-shoulder-e8b9b5b2b76f5bafed4f99fd0de8f8e5.png","width":2474,"height":1334}}},{"node":{"original":{"src":"/static/inverse-kinematics-sampling-d0484cca07f5d9c4124c64d2da94a1f4.png","width":1750,"height":1000}}},{"node":{"original":{"src":"/static/kalman-avg-ec3a62c48f003dcf94cc2a54fe6ce79c.png","width":1794,"height":736}}},{"node":{"original":{"src":"/static/kalman-covariance3x3-52e00c510ee060376047ee43ad9ee5f0.png","width":2238,"height":633}}},{"node":{"original":{"src":"/static/kalman-filter-sensors-fusion-282c30a4dccd1de36f8c6de72202fe5e.png","width":2371,"height":1165}}},{"node":{"original":{"src":"/static/kalman-sensor-fusion3-c4831b8e75420fe95501d87645565fdd.png","width":2132,"height":1096}}},{"node":{"original":{"src":"/static/kalman-system-identification-799f87ae0bffff9f0e17750b0eda44ad.png","width":1484,"height":900}}},{"node":{"original":{"src":"/static/kalman-transition-c0e343505b6b56ef59769ca45f6f1fad.png","width":2360,"height":941}}},{"node":{"original":{"src":"/static/kalman-variance-ac921fd04e712765be29951178b3b485.png","width":2318,"height":1036}}},{"node":{"original":{"src":"/static/kalman-vehicle-f0c10de7a426ed2004f2118939de814f.png","width":2097,"height":744}}},{"node":{"original":{"src":"/static/pid-all-terms-e9fdd000c98759fcf7c1200c8f2873ad.png","width":1766,"height":732}}},{"node":{"original":{"src":"/static/pid-component-dynamics-b51862d84d8d1c2052c2257b645b388f.png","width":3030,"height":988}}},{"node":{"original":{"src":"/static/pid-control-neural-network-5b67f0ef6e3d8c45f2c09c3604fd8284.png","width":2318,"height":1074}}},{"node":{"original":{"src":"/static/pid-equation-all-terms-692f6250b661a4414c1b487d280bbf3e.png","width":1821,"height":1155}}},{"node":{"original":{"src":"/static/pid-import-column-vectors-b02d76b5d90f1542e5165da8a0d529f8.png","width":1442,"height":560}}},{"node":{"original":{"src":"/static/pid-import-data-plot-5871af58451fca708a6b03686d5a9d41.png","width":1618,"height":826}}},{"node":{"original":{"src":"/static/pid-import-data-e4cddc9b5ed430e6828056ba674e62a5.png","width":1228,"height":236}}},{"node":{"original":{"src":"/static/pid-live-script-a095708bb1175c9ee533847977c0fe8a.png","width":1362,"height":346}}},{"node":{"original":{"src":"/static/pid-model-output-4ecb953b8a8aca1b409847d3fbb754b1.png","width":1544,"height":944}}},{"node":{"original":{"src":"/static/pid-smooth-data-button-646a2ae3bee2103c105d7284b653b814.png","width":1334,"height":442}}},{"node":{"original":{"src":"/static/pid-web-app-step-e0e6acdb799909788e47d4b037e546b8.png","width":2654,"height":666}}},{"node":{"original":{"src":"/static/state-of-tech-decentralize-2c0eaa2df77e68d7fda5a304735d4371.png","width":1836,"height":681}}},{"node":{"original":{"src":"/static/absolute-encoders-orbis-1a24dd0ab5ba73f020ff1f0026130eb1.jpeg","width":1472,"height":909}}},{"node":{"original":{"src":"/static/art-of-coaching-drama-dd34d1cdd726ecd11b900f2ae20cbb8e.png","width":2077,"height":738}}},{"node":{"original":{"src":"/static/inverse-kinematics-fixed-joint-743ebc101520a4770dea555fea55736d.png","width":2406,"height":1159}}},{"node":{"original":{"src":"/static/inverse-kinematics-law-of-cosines-elbow-b19bd1acf2d0074ccaca097c9e0ddcaf.png","width":2213,"height":1255}}},{"node":{"original":{"src":"/static/kalman-motor-8f996e20c1be9bcab076f79bc1adc817.png","width":1678,"height":595}}},{"node":{"original":{"src":"/static/pid-sys-id-time-domain-de8165ce981fe7cd054c86ab29dc9c11.png","width":1354,"height":866}}},{"node":{"original":{"src":"/static/pid-tuner-import-plant-580cdac4e62e6876f6012abbedf075fc.png","width":2156,"height":588}}},{"node":{"original":{"src":"/static/state-of-tech-history-69950980f3849c95c85ea6b1eeba2bbd.png","width":1970,"height":617}}},{"node":{"original":{"src":"/static/theory-of-consciousness-e1cdf3f3f89755cdb7d598c68af44f6d.png","width":2142,"height":795}}},{"node":{"original":{"src":"/static/absolute-encoders-aksim2-dfb488712ab584d0ed83c98ff5f0373b.jpeg","width":1484,"height":1227}}},{"node":{"original":{"src":"/static/ai-integration-upload-modal-6e4f1987ad55f8e3a773b1c9887a6fc9.png","width":1912,"height":1978}}},{"node":{"original":{"src":"/static/art-of-coaching-force-field-afc3592f4862704cc2a7aa3642450a75.png","width":2363,"height":887}}},{"node":{"original":{"src":"/static/kalman-constant-acceleration-notebook-7dd4328f5d10c47fee1f980c9bbbff18.png","width":1930,"height":1390}}},{"node":{"original":{"src":"/static/kalman-linear-model-notebook-53f2d7d06026fe020930f39d71f12f67.png","width":1827,"height":1372}}},{"node":{"original":{"src":"/static/kalman-lowpass-5236202bf9c9c2540e6342f4af0ec7e2.png","width":1793,"height":735}}},{"node":{"original":{"src":"/static/kalman-model-output-722de787fd4c65b07abbe268856fa50d.png","width":1805,"height":1157}}},{"node":{"original":{"src":"/static/personal-mba-book-8d098eb4d984501957096973fc02c12c.png","width":1521,"height":888}}},{"node":{"original":{"src":"/static/pid-smooth-data-667d1b139600d84957542ac6e26d24dd.png","width":2208,"height":904}}},{"node":{"original":{"src":"/static/ai-integration-prices-3410e449bb52338eac37baf0f20283aa.png","width":2036,"height":1186}}},{"node":{"original":{"src":"/static/ai-integration-system-prompt-47b60c5ea302ada40e70246e453cc2fe.png","width":2790,"height":1612}}},{"node":{"original":{"src":"/static/only-paranoid-survive-2fd8a64ab036595039d89690bcd2dc86.png","width":2148,"height":794}}},{"node":{"original":{"src":"/static/pid-spring-physics-9c3bbee3f6ef8ba012fcf368efc18626.png","width":2073,"height":893}}},{"node":{"original":{"src":"/static/pid-tune-response-4b9eba9d8a82df95aed769a1d37fd118.png","width":2158,"height":1434}}},{"node":{"original":{"src":"/static/ai-integration-postman-68462a623388dbc3f100af1db91ee0fe.png","width":2124,"height":1766}}},{"node":{"original":{"src":"/static/art-of-coaching-learning-cycle-01cfe8c84d9f2282c24d0a5c63234d84.png","width":2274,"height":1154}}},{"node":{"original":{"src":"/static/pid-control-design-b0f5a36c63ab21a0a38a929a7a7dccbb.png","width":2713,"height":1001}}},{"node":{"original":{"src":"/static/absolute-encoders-as5045-46e942cdaa780df4a35209f22e51970b.jpeg","width":2170,"height":1387}}},{"node":{"original":{"src":"/static/ai-integration-inventory-demo-a4f95055d39e3ab09b2c59f6c6a53f73.png","width":2328,"height":1212}}},{"node":{"original":{"src":"/static/ai-integration-tool-call-0b28cc1a63eac922c6c247afb7093f87.png","width":2792,"height":1610}}},{"node":{"original":{"src":"/static/model-of-human-mind-15176466145dc6e631b994f6aaf168b1.png","width":2560,"height":953}}},{"node":{"original":{"src":"/static/theory-of-consciousness-philosophy-9e37422135d0b20d7bc553b3a194e493.png","width":1115,"height":603}}},{"node":{"original":{"src":"/static/what-they-dont-succession-6ba343f3fc94f30b10ff17b95c638db5.png","width":682,"height":397}}},{"node":{"original":{"src":"/static/absolute-encoders-as5045-custom-159a2ebc04c184e4e70cfc109d1fbfe5.jpeg","width":3115,"height":1195}}},{"node":{"original":{"src":"/static/inverse-kinematics-background-c1bd38e204819d8d7d3dea9c726f912c.png","width":2264,"height":1091}}},{"node":{"original":{"src":"/static/kalman-background-6137249fa065b9a59eb8600db46574ef.png","width":1698,"height":818}}},{"node":{"original":{"src":"/static/pid-show-parameters-3627b46fa99aa21f7f351083ebe294d3.png","width":2152,"height":1430}}},{"node":{"original":{"src":"/static/inverse-kinematics-end-effector-053804d866aa93f1cda425665dfa94d1.png","width":1383,"height":1248}}},{"node":{"original":{"src":"/static/pid-presentation-9632cb1a066d0d853008f20f0e2b4a13.png","width":1656,"height":930}}},{"node":{"original":{"src":"/static/pid-what-is-integral-44e09f4b9aaf464de5818c97c2eddc9c.png","width":2098,"height":920}}},{"node":{"original":{"src":"/static/investment-casting-process-da1a57c962eaa69fd0fcdbf6c14863f9.png","width":1864,"height":684}}},{"node":{"original":{"src":"/static/ai-integration-repository-files-fa9137f2cc04c8f3c699132370427c6a.png","width":2902,"height":1920}}},{"node":{"original":{"src":"/static/ai-integration-6881eaaf46b3c277c6f08136e0975add.png","width":1950,"height":720}}},{"node":{"original":{"src":"/static/personal-mba-refining-e9f1db03c81bed733e3cd01123af7693.png","width":1920,"height":921}}},{"node":{"original":{"src":"/static/absolute-encoders-rm08-6fcfbc9acc5faa6f848262e63007ebec.jpeg","width":2016,"height":1371}}},{"node":{"original":{"src":"/static/art-of-coaching-72579ce0a3ad1820b1f9a9ab39205ca0.png","width":1943,"height":698}}},{"node":{"original":{"src":"/static/microsoft-authentication-process-62ff97d35de82762e84a8b9418817471.png","width":1920,"height":800}}},{"node":{"original":{"src":"/static/microsoft-authentication-18932cda0756860182497be2c7ea1df1.png","width":1993,"height":728}}},{"node":{"original":{"src":"/static/pid-mpc-atlas-179410331cf7f348d7c74715f9830a27.png","width":1933,"height":1358}}},{"node":{"original":{"src":"/static/ai-integration-lm-studio-browser-a5e41a9c6c0a1fdb86b434a9c7b44952.png","width":3446,"height":2138}}},{"node":{"original":{"src":"/static/art-of-coaching-communication-98b4d7a6a910884f2c2115331c3dbacd.png","width":4441,"height":1270}}},{"node":{"original":{"src":"/static/art-of-coaching-do-it-disk-eadd2b510e8ffdec258a232138974e46.png","width":2381,"height":1307}}},{"node":{"original":{"src":"/static/art-of-coaching-support-295f70fe9872e7a5328bd6d4aa4407ec.png","width":1998,"height":1087}}},{"node":{"original":{"src":"/static/pid-background-06c4687b59f2caa7232337777d26bed3.png","width":1757,"height":1081}}},{"node":{"original":{"src":"/static/absolute-encoders-hall-effect-71b3164ebe9d8e38f6d107822b02276a.jpeg","width":2535,"height":2733}}},{"node":{"original":{"src":"/static/what-they-dont-title-6c84cfa981e236da71f98b7fcde554af.png","width":3012,"height":1036}}},{"node":{"original":{"src":"/static/personal-mba-measure-2eca9147b90b67475962a346bb25f257.png","width":1920,"height":1080}}},{"node":{"original":{"src":"/static/art-of-coaching-balloon-ea04393b9d39d0d7f10c1bb41fcd336f.png","width":1564,"height":1121}}},{"node":{"original":{"src":"/static/art-of-coaching-ei-cone-ef855493172972a227241e3d5ae96e5b.png","width":2740,"height":1138}}},{"node":{"original":{"src":"/static/absolute-encoders-np24hs-29a9d7db0b5e78dc79c1d6d07592bc6f.jpeg","width":2157,"height":2109}}},{"node":{"original":{"src":"/static/adc-review-2e0f04fc009d725ae33bdcd3d8b721b6.png","width":3505,"height":1254}}},{"node":{"original":{"src":"/static/inverse-kinematics-6543b397e7676e4350edc996b346e35b.png","width":2370,"height":915}}},{"node":{"original":{"src":"/static/ai-integration-hugging-face-hub-34284b5b1043af8ecfbda2072f6f3479.png","width":3334,"height":1968}}},{"node":{"original":{"src":"/static/model-of-human-mind-bacteria-04f0782cb84d3790ff1b442447376ef7.png","width":3505,"height":1897}}},{"node":{"original":{"src":"/static/adc-review-mcp3008-d1bd387618da0e041cc23c77a5490770.png","width":1244,"height":932}}},{"node":{"original":{"src":"/static/adc-review-pi16adc-0f653404b5f92b59a440b2fec69a80b0.png","width":1704,"height":616}}},{"node":{"original":{"src":"/static/model-of-human-mind-elements-4f4467f973209cfec904d7af71fb55c4.png","width":2065,"height":1323}}},{"node":{"original":{"src":"/static/ai-integration-llm-book-8e678374d421a3fc88dca91828444484.png","width":1194,"height":1458}}},{"node":{"original":{"src":"/static/model-of-human-mind-chess-3b64b83b4bcfb2fb678c11d9d000b58f.png","width":2880,"height":1420}}},{"node":{"original":{"src":"/static/absolute-encoders-jt30-7bef2fe460cf393df32763438717c6c8.jpeg","width":3024,"height":2970}}},{"node":{"original":{"src":"/static/what-they-dont-teach-you-1481963c2037a63c0315473a9841bef3.png","width":1737,"height":1355}}},{"node":{"original":{"src":"/static/360-video-pipeline-652c938f9559464fa0fa151f9f946273.png","width":2191,"height":796}}},{"node":{"original":{"src":"/static/kalman-filter-29410f73561e0e9a156ca8aa37385124.png","width":2261,"height":834}}},{"node":{"original":{"src":"/static/pid-fixture-d02a6a30acddb9c03617882e9607963c.png","width":1516,"height":1381}}},{"node":{"original":{"src":"/static/model-of-human-mind-blender-nodes-5b46cbc18c515d0786e6634c202ee885.png","width":3457,"height":1677}}},{"node":{"original":{"src":"/static/model-of-human-mind-ganglion-ecc4b5816e2b6f4177e07895c3040dc9.png","width":1370,"height":857}}},{"node":{"original":{"src":"/static/state-of-tech-15debc9599aa4d89cf328431df6c86a5.png","width":2880,"height":1105}}},{"node":{"original":{"src":"/static/personal-mba-f0dc1c539b758c308805c2edada6b42f.png","width":3857,"height":1460}}},{"node":{"original":{"src":"/static/absolute-encoder-review-1d0984a18e91b51416b63eef9e8ec4bb.png","width":2844,"height":1074}}},{"node":{"original":{"src":"/static/only-paranoid-survive-oldman-3c5a2e1ac50586c82ba027ea9686ad91.png","width":2032,"height":974}}},{"node":{"original":{"src":"/static/kalman-presentation-023ea5f5f91358009d4eac738511bc8a.png","width":3456,"height":1936}}},{"node":{"original":{"src":"/static/what-they-dont-teach-you-thegame-0c3bd8bd354e9cfbb2061a4c0120f0e8.png","width":2880,"height":1620}}},{"node":{"original":{"src":"/static/absolute-encoders-lamprey-fcf2d3ab697c3894b362b304f532d004.jpeg","width":4032,"height":3024}}},{"node":{"original":{"src":"/static/kalman-maybeck-vol1-e383aaeb6448f55edbf19468ecf3e8e4.png","width":2016,"height":1512}}},{"node":{"original":{"src":"/static/kalman-theory-user-9e611561e5c89ee26a08aad097451484.png","width":2016,"height":1456}}},{"node":{"original":{"src":"/static/model-of-human-mind-chariot-ddf769b36151e74bf42075fbaf443d78.png","width":2503,"height":1492}}},{"node":{"original":{"src":"/static/adc-review-arduino-micro-d5bd75ece713e3ca437ec5219638bf86.png","width":2218,"height":1528}}},{"node":{"original":{"src":"/static/adc-review-ads1115-fb958c48473610d92b9d505dd997ef61.png","width":1626,"height":1176}}},{"node":{"original":{"src":"/static/drumming-robot-logo-35bef056c6dbc3b66ccc76efa48c9521.png","width":864,"height":116}}},{"node":{"original":{"src":"/static/hybrid-logo-c4a8ec2e712d36180916ab7055b91a4b.png","width":1895,"height":420}}},{"node":{"original":{"src":"/static/hybrid-midi-f1801fc05d3c21e1605a1525c3b63e7e.png","width":1117,"height":838}}},{"node":{"original":{"src":"/static/cyber-guitar-logo-d74dc54c78f514b6e17f333d1bba4a76.png","width":1575,"height":162}}},{"node":{"original":{"src":"/static/hybrid-bridge-1-3862e85842841da1416dc48c4a98e7da.jpg","width":800,"height":600}}},{"node":{"original":{"src":"/static/hybrid-bridge-2-0139b8b0c2e295295fbf51960b81795b.jpg","width":800,"height":600}}},{"node":{"original":{"src":"/static/hybrid-switch-fe9cb4e3c672f346b031d84f75f56057.jpg","width":640,"height":640}}},{"node":{"original":{"src":"/static/cyber-guitar-live-049109088ee2b1b1adb1d51610fa0ba5.jpg","width":2270,"height":1548}}},{"node":{"original":{"src":"/static/drumming-robot-concepts3-08c283500a0f234682226cc5f6617c1f.png","width":690,"height":591}}},{"node":{"original":{"src":"/static/drumming-robot-concepts4-772c9529da36a6b6f0b997a11221c150.jpg","width":2016,"height":1241}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-chest-67d90711240598e23fed63485513c1fc.jpg","width":2048,"height":1080}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-hand-395c0fc9f6b5a582046cc4d8126b7a0e.jpg","width":1359,"height":1080}}},{"node":{"original":{"src":"/static/hybrid-back-e00050b5bd5f8a6c793260be4e7454c0.jpg","width":2499,"height":1497}}},{"node":{"original":{"src":"/static/hybrid-string-lock-1-acc0579c259eceab4738a57605463a3b.jpg","width":552,"height":414}}},{"node":{"original":{"src":"/static/hybrid-string-lock-2-6d4ce794efea00495821eef3c89fdb54.jpg","width":800,"height":600}}},{"node":{"original":{"src":"/static/hybrid-top-bdc6cac1e332b8ac93e19ccec53723f5.jpg","width":2558,"height":1601}}},{"node":{"original":{"src":"/static/cyber-guitar-lights-7e752716d921114847e0520988ec7d2d.jpg","width":1500,"height":716}}},{"node":{"original":{"src":"/static/cyber-guitar-paint-08f9d0e6f830f666b26d2f7721b43193.jpg","width":960,"height":832}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-chest-bake-cb52271802d059e7795f054e60dd2a2b.jpg","width":998,"height":1073}}},{"node":{"original":{"src":"/static/hybrid-cad-layout-2978a4622bc0249e60c18f2138a3e2ff.png","width":3769,"height":2912}}},{"node":{"original":{"src":"/static/hybrid-front-46b19e309b9e363e1dc90c53224a6f8c.jpg","width":2685,"height":1641}}},{"node":{"original":{"src":"/static/hybrid-midi-cad-cc106d4408d5904bf4e8f434d0d40b2b.png","width":1371,"height":889}}},{"node":{"original":{"src":"/static/cyber-guitar-cnc-d6521b26150a8526c49c20c6ef6e2752.jpg","width":1125,"height":793}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-assembly1-aa419423af3dfe99365be62bcd08b7f5.jpg","width":1210,"height":843}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-shells-c29504036d0597248d94b8ddc2b68630.jpg","width":1104,"height":998}}},{"node":{"original":{"src":"/static/cyber-guitar-cast-3224582f184c7fb8c91136a97b316db3.jpg","width":1682,"height":1678}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-assembly2-584ad388f7b84e7136b4cf656edb64a6.jpg","width":1210,"height":718}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-chest-cast-5ec23a0e4a2ec082f97d1fc63e6c2510.jpg","width":1331,"height":998}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-finishing-5d6baefba58e9ae749ebae1392364a32.jpg","width":1440,"height":1440}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-pistons-f8ae691d92edfc2b6f433e37eedde5d8.jpg","width":1350,"height":1152}}},{"node":{"original":{"src":"/static/hybrid-knobs-2760ce28f99066ec64444500472f1a22.png","width":714,"height":630}}},{"node":{"original":{"src":"/static/drumming-robot-head-model-37ff225caf8978dccd9d917230bad6c0.jpg","width":1663,"height":1543}}},{"node":{"original":{"src":"/static/tau-rubber2-ce93ab862e27eebf3b9a23684f7340b6.jpg","width":1760,"height":1351}}},{"node":{"original":{"src":"/static/cyber-guitar-d290afd7b028a39ec42c66dff95bf889.png","width":1869,"height":684}}},{"node":{"original":{"src":"/static/drumming-robot-arm-tool-172721d0b674de57974834dc7f92ed1f.jpg","width":2159,"height":1663}}},{"node":{"original":{"src":"/static/drumming-robot-motor-80f1be1a58cf2ed80e2e25ce8e72d7d1.jpg","width":1814,"height":1814}}},{"node":{"original":{"src":"/static/drumming-robot-power-6805f8a28c84748025f2495ec024d94d.jpg","width":1814,"height":1814}}},{"node":{"original":{"src":"/static/drumming-robot-f820ce0e367d6e292d546a0e749381d8.png","width":1557,"height":587}}},{"node":{"original":{"src":"/static/exoskeleton-presentation-40782b12db011a0fae7edd977d74225e.png","width":1774,"height":998}}},{"node":{"original":{"src":"/static/tau-coil-winding-5d11c176d4199f2b061b750bf149a1be.jpg","width":1512,"height":1512}}},{"node":{"original":{"src":"/static/tau-test-9372e4b3c51a7cfbdf38919d3479d34e.jpg","width":1398,"height":1398}}},{"node":{"original":{"src":"/static/cyber-guitar-ribbons-ddd25646dee6ddc01af2d5b69dc6b6ff.jpg","width":1633,"height":1512}}},{"node":{"original":{"src":"/static/drumming-robot-encoder-0fe08c0bebcd060cf8071743221f0468.jpg","width":2016,"height":1512}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-3d-48169464f2f23302cf27d3202ec5d563.png","width":1039,"height":1204}}},{"node":{"original":{"src":"/static/cyber-guitar-mold-c96497253847a128a51ce0eb2d731a5a.jpg","width":1857,"height":1333}}},{"node":{"original":{"src":"/static/drumming-robot-encoders-1a2e740e4fac668bf40057777025c3fe.jpg","width":2419,"height":1814}}},{"node":{"original":{"src":"/static/hybrid-bass-pickup-4c06dcb6ddc7a4537302a8d4d284d03b.png","width":1500,"height":958}}},{"node":{"original":{"src":"/static/hybrid-221ccf44c449c0fee293eabd36b99a19.png","width":3228,"height":1203}}},{"node":{"original":{"src":"/static/cyber-guitar-osc-pcb-4752552a56eaac1dc5d8f04cda3ae4c3.jpg","width":2016,"height":1512}}},{"node":{"original":{"src":"/static/tau-cast-14884726a704f6e3a1fdfbeac2824083.jpg","width":1876,"height":1512}}},{"node":{"original":{"src":"/static/drumming-robot-arm-assembly-42f658b29eb14395931ee2da06f95891.jpg","width":2097,"height":1617}}},{"node":{"original":{"src":"/static/drumming-robot-body-f6273ecdbfb0cbba10b95fa6559d4133.png","width":1432,"height":1363}}},{"node":{"original":{"src":"/static/drumming-robot-concepts1-94780f216fa4220f893cdfb4c7bd7e52.png","width":1343,"height":1291}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-print-assemble-564f861798d8fa434d5610ee79096969.jpg","width":1659,"height":945}}},{"node":{"original":{"src":"/static/tau-cad04-7ca4198fa7b4684556f28334a11c98f6.jpg","width":2665,"height":1809}}},{"node":{"original":{"src":"/static/tau-computer-39d530920af20fe10952cdc5abd3bc2b.jpg","width":2139,"height":1682}}},{"node":{"original":{"src":"/static/tau-inventor-26b8c64901808aafcf5356a2b8e0995a.jpg","width":4146,"height":1953}}},{"node":{"original":{"src":"/static/tau-assembly-8456977fdb3799c718a2ed8e1adfe126.jpg","width":1999,"height":1814}}},{"node":{"original":{"src":"/static/tau-cad03-65eb83cb78668eb0968d5ccd0dc50118.jpg","width":3154,"height":1790}}},{"node":{"original":{"src":"/static/drumming-robot-lab-8df28a089f4b9bbe3637122b65568029.jpg","width":2419,"height":1814}}},{"node":{"original":{"src":"/static/hybrid-midi-pickup-7103fa3cefdd6b214e63426d6697216f.png","width":2723,"height":1353}}},{"node":{"original":{"src":"/static/tau-parts03-61ffa5c847824b8d2223d753ad5fc829.jpg","width":1667,"height":1811}}},{"node":{"original":{"src":"/static/drumming-robot-head-9661d741cb20bf6a639653ae382d6dda.png","width":1542,"height":1095}}},{"node":{"original":{"src":"/static/tau-cad01-09d13f738565543b27703a9dac34887c.jpg","width":2605,"height":1531}}},{"node":{"original":{"src":"/static/drumming-robot-face-side-34f37a39b826031e18958b0012e47dd3.png","width":1216,"height":1128}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-print-f2f929bdcc3d57cba17600fb854dbb98.jpg","width":3455,"height":2303}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-c2216c54dff1e1789a7525f668367c64.png","width":1886,"height":1006}}},{"node":{"original":{"src":"/static/tau-cad02-347430ac5961bba60a8f71797c817a3a.jpg","width":2600,"height":1513}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-floor-c69dc30e046cf863356ab45afd260ab9.jpg","width":2984,"height":2201}}},{"node":{"original":{"src":"/static/cyber-guitar-screen-f545905e35f88af6df034786d62f9514.jpg","width":3024,"height":3560}}},{"node":{"original":{"src":"/static/drumming-robot-arms-d7eb6fcf155092144bc621b5b7a49044.png","width":1779,"height":1410}}},{"node":{"original":{"src":"/static/cyber-guitar-test-b3f004a33050c1e2d06eae3e1d76eec3.jpg","width":4032,"height":3024}}},{"node":{"original":{"src":"/static/drumming-robot-arm-sensors-b744e7d3c4b2034f6bb3306304ce33b4.jpg","width":4032,"height":3024}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-moldmaking-0d3de62f7cd0cac141c5bd8ef858d9e3.jpg","width":3024,"height":2829}}},{"node":{"original":{"src":"/static/drumming-robot-face-front-042189484f4f150e95416550432e06f6.png","width":1273,"height":1273}}},{"node":{"original":{"src":"/static/tau-parts02-2b823005b83fe8e4e4fac483c0c19f93.jpg","width":2822,"height":2117}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-chest-mold-5639d8bd556bb3799e1884d932ed199c.jpg","width":3024,"height":3385}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-chest-finished-7eee818f19a5e9ffe1abb4f1026bcc91.png","width":1210,"height":907}}},{"node":{"original":{"src":"/static/elysium-exoskeleton-print-parts-bd1a4a2aad4760a036255ec5b69b8baf.png","width":1555,"height":1037}}},{"node":{"original":{"src":"/static/drumming-robot-concepts2-6569b6fa82a791dc5a7f262c94a0a441.png","width":1802,"height":1442}}},{"node":{"original":{"src":"/static/cyber-guitar-tape-1f93fe9f005d1527f0b6773401cbd716.jpg","width":4032,"height":3024}}},{"node":{"original":{"src":"/static/drumming-robot-still-life-dcf5fc1480add471b50ea96ade07bc6e.png","width":1676,"height":1676}}},{"node":{"original":{"src":"/static/drumming-robot-wiring-dc84b753a47f26ba9dd553de31d34bb8.jpg","width":3146,"height":2967}}},{"node":{"original":{"src":"/static/cyber-guitar-done-8595ea82e6b15bd3e9098f9c986431d2.jpg","width":3623,"height":2733}}},{"node":{"original":{"src":"/static/tau-cannon-111bb35840474704cded256cc8ca2de4.png","width":4884,"height":1778}}},{"node":{"original":{"src":"/static/tau-muzzle-3a454d96a280834e213053cfeaeac80e.png","width":1856,"height":1287}}},{"node":{"original":{"src":"/static/drumming-robot-arm-6f1c020db528f161138225a156a7a825.png","width":1720,"height":1720}}}]}},"pageContext":{"slug":"rag-with-vector-databases","collection":"articles","subCollection":null}},"staticQueryHashes":["3391108849","3391108849","3424358133"]}