> 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/components/vector-database/advanced-usage.md).

# Advanced Usage

**Search Options:**

You can use different search options for different types of retrieval methods in any vectordb component given by genai stack.

\==> Weaviate db

```python
from genai_stack.vectordb.weaviate_db import Weaviate

weavaite_db = Weaviate.from_kwargs(
    url="http://localhost:8080/",
    index_name="Testing",
    text_key="test",
    search_method="max_marginal_relevance_search",
    search_options={"k": 2, "fetch_k": 10, "lambda_mult": 0.3},
)
```

\==> Chromadb

```python
from genai_stack.vectordb.chromadb import ChromaDB

chromadb = ChromaDB.from_kwargs(
    search_method="max_marginal_relevance_search", 
    search_options={"k": 2, "fetch_k": 10, "lambda_mult": 0.3}
)
```
