#244 — [Epic] RAG
Repo: Twill-AI/twill-llm-engine State: closed | Status: done Assignee: meliascosta
Created: 2025-01-29 · Updated: 2025-04-03
Description
To improve performance of inference and increase relevance of answers we need to introduce some domain-specific knowledge bases to LlmEngine and implement Retrieval-augmented generation (aka RAG). Based on results from this Beta tester’s error analysis report.
See https://twillpayments.atlassian.net/wiki/spaces/TD/pages/250216449/RAG for list of features which RAG may enable and implementation evaluation.
SQL Generation Logic
To improve the generation of relevant and correct SQL queries the model needs more context about the knowledge domain (right now only accounting but later payments and commerce) and database structure. Additionally we want to add few shot learning examples to query generation to boost performance. This means adding three collections to the rag structure:
- Accounting knowledge
- Database descriptors (tables and columns)
- Correct SQL examples
Notes
Add implementation notes, blockers, and context here
Related
Add wikilinks to related people, meetings, or other tickets