llama-stack icon indicating copy to clipboard operation
llama-stack copied to clipboard

Improve RAG as attachment behaviour in agent

Open yanxi0830 opened this issue 7 months ago • 3 comments

🚀 Describe the new functionality needed

  • We currently perform adhoc preprocessing & ingesting with documents as attachment in agent on the fly.

Code Pointer: https://github.com/meta-llama/llama-stack/blob/33b096cc21e48910cf05f0c3e513032adb99fa84/llama_stack/providers/inline/agents/meta_reference/agent_instance.py#L922-L930

  • We should make the behaviour for RAG as attachment more explicit. E.g.
  1. Explicit text extraction based on document file format
  2. Instead of adhoc hardcoding an embedding model and indexing, directly pass in raw text as messages.

Further improvements:

  1. Integrate Document type with Files
  2. Mature preprocessing & document parsing into text.

💡 Why is this needed? What if we don't build it?

User DevX

Other thoughts

No response

yanxi0830 avatar Mar 14 '25 03:03 yanxi0830