llama-stack/docs
Daniele Martinoli fb998683e0
fix: Agent uses the first configured vector_db_id when documents are provided (#1276)
# What does this PR do?
The agent API allows to query multiple DBs using the `vector_db_ids`
argument of the `rag` tool:
```py
        toolgroups=[
            {
                "name": "builtin::rag",
                "args": {"vector_db_ids": [vector_db_id]},
            }
        ],
```
This means that multiple DBs can be used to compose an aggregated
context by executing the query on each of them.

When documents are passed to the next agent turn, there is no explicit
way to configure the vector DB where the embeddings will be ingested. In
such cases, we can assume that:
- if any `vector_db_ids` is given, we use the first one (it probably
makes sense to assume that it's the only one in the list, otherwise we
should loop on all the given DBs to have a consistent ingestion)
- if no `vector_db_ids` is given, we can use the current logic to
generate a default DB using the default provider. If multiple providers
are defined, the API will fail as expected: the user has to provide
details on where to ingest the documents.

(Closes #1270)

## Test Plan
The issue description details how to replicate the problem.

[//]: # (## Documentation)

---------

Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
2025-03-04 21:44:13 -08:00
..
_static chore: rename task_config to benchmark_config (#1397) 2025-03-04 12:44:04 -08:00
notebooks chore: rename task_config to benchmark_config (#1397) 2025-03-04 12:44:04 -08:00
openapi_generator chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
resources Several documentation fixes and fix link to API reference 2025-02-04 14:00:43 -08:00
source fix: Agent uses the first configured vector_db_id when documents are provided (#1276) 2025-03-04 21:44:13 -08:00
zero_to_hero_guide docs: Update llama-stack version in README.md (#1330) 2025-02-28 13:37:03 -08:00
conftest.py No spaces in ipynb tests 2025-02-07 11:56:22 -08:00
contbuild.sh Fix broken links with docs 2024-11-22 20:42:17 -08:00
dog.jpg Support for Llama3.2 models and Swift SDK (#98) 2024-09-25 10:29:58 -07:00
getting_started.ipynb fix: update getting_started notebook to pass nbeval (#1318) 2025-02-27 23:13:00 -05:00
license_header.txt Initial commit 2024-07-23 08:32:33 -07:00
make.bat first version of readthedocs (#278) 2024-10-22 10:15:58 +05:30
Makefile first version of readthedocs (#278) 2024-10-22 10:15:58 +05:30
readme.md Fix README.md notebook links (#976) 2025-02-05 14:33:46 -08:00
requirements.txt fix: add tomli to requirements.txt for docs; ideally we need to move this to uv 2025-03-03 11:11:17 -08:00

Llama Stack Documentation

Here's a collection of comprehensive guides, examples, and resources for building AI applications with Llama Stack. For the complete documentation, visit our ReadTheDocs page.

Content

Try out Llama Stack's capabilities through our detailed Jupyter notebooks: