llama-stack-mirror/docs/notebooks
Xi Yan 094eb6a5ae
feat(rag): entire document context with attachments (#1763)
# What does this PR do?
**What**
Instead of adhoc creating a vectordb and chunking when documents ae sent
as an attachment to agent turn, we directly pass raw text from document
into messages to model for user context, and let model perform
summarization directly.

This removes the magic behaviour, and yields better performance than
existing approach.

**Improved Performance**
- RAG lifecycle notebook
  - Model: 0.3 factuality score
  - (+ websearch) Agent: 0.44 factuality score
  - (+ vector db) Agent: 0.3 factuality score
  - (+ raw context) Agent: 0.6 factuality score

Closes https://github.com/meta-llama/llama-stack/issues/1478

[//]: # (If resolving an issue, uncomment and update the line below)
[//]: # (Closes #[issue-number])

## Test Plan
- [NEW] added section in RAG lifecycle notebook shows better performance

<img width="840" alt="image"
src="https://github.com/user-attachments/assets/a0c4e816-809a-41c0-9124-89825983e3f5"
/>


[//]: # (## Documentation)
2025-03-23 16:57:48 -07:00
..
Alpha_Llama_Stack_Post_Training.ipynb feat(api): (1/n) datasets api clean up (#1573) 2025-03-17 16:55:45 -07:00
Llama_Stack_Agent_Workflows.ipynb feat(api): simplify client imports (#1687) 2025-03-20 10:15:49 -07:00
Llama_Stack_Benchmark_Evals.ipynb feat(api): (1/n) datasets api clean up (#1573) 2025-03-17 16:55:45 -07:00
Llama_Stack_RAG_Lifecycle.ipynb feat(rag): entire document context with attachments (#1763) 2025-03-23 16:57:48 -07:00