<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chroma &#8211; iAIFeed</title>
	<atom:link href="https://www.iaifeed.com/tag/chroma/feed" rel="self" type="application/rss+xml" />
	<link>https://www.iaifeed.com</link>
	<description>iAIFeed</description>
	<lastBuildDate>Thu, 05 Nov 2026 03:12:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://www.iaifeed.com/wp-content/uploads/2026/07/cropped-iaifeed1-80x80.png</url>
	<title>Chroma &#8211; iAIFeed</title>
	<link>https://www.iaifeed.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Connect Chroma to LangChain for Retrieval Augmented Generation</title>
		<link>https://www.iaifeed.com/how-to-connect-chroma-to-langchain-for-rag</link>
					<comments>https://www.iaifeed.com/how-to-connect-chroma-to-langchain-for-rag#respond</comments>
		
		<dc:creator><![CDATA[iamltlb]]></dc:creator>
		<pubDate>Mon, 12 Oct 2026 12:43:36 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Chroma]]></category>
		<guid isPermaLink="false">https://www.iaifeed.com/how-to-connect-chroma-to-langchain-for-rag</guid>

					<description><![CDATA[Wire a persistent Chroma store into a LangChain retrieval chain so your app answers questions from your own documents instead of the model's memory.]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.iaifeed.com/ai-tool/chroma">Chroma</a> stores vectors; <a href="https://www.iaifeed.com/ai-tool/langchain">LangChain</a> orchestrates the prompt and model call. Together they form the standard RAG stack. This is the concrete wiring between them.</p>
<p><strong>Quick answer:</strong> Wrap Chroma with <code>langchain_chroma.Chroma</code>, call <code>.as_retriever()</code>, and pipe the retriever into a prompt and model. Embeddings must match between indexing and querying or results are noise.</p>
<p>The single most common bug in this stack is a mismatched embedding model. You index with one model and query with another, and every result looks almost random. Keep them in one place.</p>
<h2>How do you install the integration?</h2>
<pre><code>pip install langchain langchain-openai langchain-chroma chromadb</code></pre>
<p>Note it is <code>langchain-chroma</code>, a separate package since the 0.2 split. Importing <code>langchain_community.vectorstores.Chroma</code> still works but is on the deprecation path.</p>
<h2>How do you index documents into Chroma?</h2>
<pre><code>from langchain_openai import OpenAIEmbeddings
from langchain_chroma import Chroma
from langchain_text_splitters import RecursiveCharacterTextSplitter

emb = OpenAIEmbeddings(model="text-embedding-3-small")
texts = RecursiveCharacterTextSplitter(chunk_size=800, chunk_overlap=100)
              .split_text(open("manual.txt").read())

store = Chroma.from_texts(texts, embedding=emb,
                          persist_directory="./chroma_db",
                          collection_name="manual")

retriever = store.as_retriever(search_kwargs={"k": 4})</code></pre>
<p>Use the same <code>OpenAIEmbeddings</code> instance for indexing and querying. If you ever change models, you must re-index — the old vectors are meaningless to the new model.</p>
<h2>How do you build the retrieval chain?</h2>
<pre><code>from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.runnables import RunnablePassthrough
from langchain_core.output_parsers import StrOutputParser

prompt = ChatPromptTemplate.from_template(
    "Answer using this context only. If unsure, say so.\n"
    "{context}\n\nQuestion: {question}")

chain = ({"context": retriever, "question": RunnablePassthrough()}
         | prompt | ChatOpenAI(model="gpt-4o-mini", temperature=0)
         | StrOutputParser())

print(chain.invoke("How do I reset the device?"))</code></pre>
<p>The instruction to answer only from context is what stops the model inventing an answer. It is not a guarantee, but it measurably cuts hallucination on retrieval gaps.</p>
<h2>What does this stack cost?</h2>
<p>Chroma and LangChain are both free and open source. You pay for embeddings once at index time (about $0.02 per million tokens with <code>text-embedding-3-small</code>) and for the chat model on every query. A small documentation site costs cents per month to index and a fraction of a cent per question with a mini model.</p>
<h2>How do you keep answers accurate?</h2>
<ul>
<li>Log the retrieved chunks alongside the answer so you can see what the model actually saw.</li>
<li>Raise or lower <code>k</code> and watch quality — too few chunks miss context, too many dilute it.</li>
<li>Add metadata filters so a query only searches the relevant collection.</li>
<li>Re-index when your source documents change; stale vectors give confident wrong answers.</li>
</ul>
<p><strong>Who this suits:</strong> developers building doc Q&#038;A, internal search, or support assistants. <strong>Who should skip it:</strong> if your source fits in one prompt and never changes, you do not need retrieval — just paste the text and save the complexity.</p>
<h2>Quick Summary</h2>
<ul>
<li>Use <code>langchain-chroma</code> and the same embedding model for index and query.</li>
<li>Chunk at 800 characters with 100 overlap as a starting point.</li>
<li><code>as_retriever()</code> plus a prompt template is the core RAG chain.</li>
<li>Embeddings cost pennies; the chat model dominates query cost.</li>
<li>Re-index on source changes or answers go stale.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.iaifeed.com/how-to-connect-chroma-to-langchain-for-rag/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Use Chroma as a Local Vector Store for RAG</title>
		<link>https://www.iaifeed.com/how-to-use-chroma-as-a-local-vector-store</link>
					<comments>https://www.iaifeed.com/how-to-use-chroma-as-a-local-vector-store#respond</comments>
		
		<dc:creator><![CDATA[iamltlb]]></dc:creator>
		<pubDate>Mon, 12 Oct 2026 12:43:17 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Chroma]]></category>
		<guid isPermaLink="false">https://www.iaifeed.com/how-to-use-chroma-as-a-local-vector-store</guid>

					<description><![CDATA[Chroma is the easiest vector store to start with: it runs in-process and saves to a folder. Here is how to persist it, query it, and know when to migrate off it.]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.iaifeed.com/ai-tool/chroma">Chroma</a> is an open-source vector database that runs inside your Python process and persists to a local folder. No server, no Docker, no account. That makes it the default first choice for retrieval-augmented generation prototypes.</p>
<p><strong>Quick answer:</strong> <code>pip install chromadb</code>, create a persistent client pointed at a directory, add documents with <code>collection.add</code>, and query with <code>collection.query</code>. Everything stays on disk between runs.</p>
<p>Chroma will not scale to millions of vectors with high concurrency, and it does not pretend to. For a single-machine app or a prototype, that ceiling is far away.</p>
<h2>How do you install and create a persistent store?</h2>
<pre><code>pip install chromadb</code></pre>
<pre><code>import chromadb
client = chromadb.PersistentClient(path="./chroma_db")
col = client.get_or_create_collection(name="docs")</code></pre>
<p>The path argument is the difference between a throwaway in-memory store and one that survives a restart. Use <code>Client()</code> for the ephemeral version when you are prototyping and want a clean slate each run.</p>
<h2>How do you add documents?</h2>
<p>Chroma can embed for you if you give it text and let it use its default embedding function, or you can pass vectors you computed yourself.</p>
<pre><code>col.add(
    documents=["Chroma persists to disk", "Chroma runs in-process"],
    metadatas=[{"src": "guide"}, {"src": "faq"}],
    ids=["d1", "d2"],
)</code></pre>
<p>IDs are required and must be unique. Re-adding an existing ID errors unless you use <code>upsert</code>.</p>
<h2>How do you query with filters?</h2>
<pre><code>res = col.query(
    query_texts=["does chroma save data?"],
    n_results=2,
    where={"src": "guide"},
)</code></pre>
<p><code>where</code> filters on metadata before ranking, which is how you scope a search to one customer or document type. Metadata values should be simple types — strings, numbers, booleans. Nested objects are not supported.</p>
<h2>Is Chroma free?</h2>
<p>The library is Apache 2.0 and free. The hosted Chroma Cloud service has a free tier and paid plans above it. Self-hosted, your only cost is disk and whatever embedding provider you use.</p>
<h2>How do you update and delete data?</h2>
<ul>
<li><code>col.update(ids=[...], metadatas=[...])</code> changes metadata without re-embedding.</li>
<li><code>col.upsert(...)</code> inserts or replaces in one call.</li>
<li><code>col.delete(ids=[...])</code> removes vectors permanently.</li>
<li><code>client.delete_collection("docs")</code> wipes everything — no confirmation.</li>
</ul>
<h2>When should you move to something bigger?</h2>
<p>Chroma handles hundreds of thousands of vectors on a laptop fine. Move on when you need multi-user concurrency, horizontal scale, or filtered search across tens of millions of rows. <a href="https://www.iaifeed.com/ai-tool/weaviate">Weaviate</a> and similar servers exist for that jump. The API shape is similar enough that migration is mostly a rewrite of the store layer, not the whole app.</p>
<p><strong>Who this suits:</strong> solo developers and small teams who want retrieval working today without infrastructure. <strong>Who should skip it:</strong> production systems serving many concurrent users, where a server-based database is the honest choice from day one.</p>
<h2>Quick Summary</h2>
<ul>
<li>Chroma is a free, open-source, in-process vector store that persists to a folder.</li>
<li>Use <code>PersistentClient(path=...)</code> so data survives restarts.</li>
<li>Add with <code>add</code>, filter with <code>where</code> on flat metadata.</li>
<li>Handles hundreds of thousands of vectors locally without a server.</li>
<li>Migrate to a server-based store when concurrency becomes the bottleneck.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.iaifeed.com/how-to-use-chroma-as-a-local-vector-store/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
