> For the complete documentation index, see [llms.txt](https://genaistack.aiplanet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://genaistack.aiplanet.com/v0.1.0/components/vector-database/chromadb.md).

# Chromadb

### Chromadb

This is the default database used when no vectordb is specified . We create a temp directory and persist the embeddings there using the PersistentClient of Chromadb by default.

This is for experimentation purposes when the user wants a quick headstart and wants to experiment with things quickly.

**Compulsory arguments:**

* class\_name => The name of the index under which documents are stored

Here are some sample configurations:

\=> Chromadb with embedding specification

```
"vectordb": {
    "name": "chromadb",
    "class_name": "genai_stack",
    "embedding": {
        "name": "HuggingFaceEmbeddings",
        "fields": {
            "model_name": "sentence-transformers/all-mpnet-base-v2",
            "model_kwargs": { "device": "cpu" }
        }
    }
}
```

\==> Chromadb without embedding specification. Without any embedding specification we use the default embedding which is HuggingFaceEmbeddings

```
"vectordb": {
    "name": "chromadb",
    "class_name": "genai_stack"
}
```

**Python Usage:**

```
from genai_stack.vectordb.chromadb import ChromaDB

config = {"class_name": "MyIndexName"}
vectordb = ChromaDB.from_kwargs(config)
vectordb.search("Your question")

# Output 
# <Documents closest to your question>
```
