AOSSIE-Org / AOSSIE-Org/Ell-ena
FEATURE REQUEST: Implement RAG for tasks/tickets using vector embeddings to reduce token costs
- Lingua principale
- Dart
- Stelle
- 54
- Fork
- 110
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### Is your feature request related to a problem?
- [x] Yes, it is related to a problem
### Describe the feature you'd like
## 🌟 Feature Description
Extend existing pgvector-based RAG infrastructure from meeting transcriptions to tasks and tickets. Replace full dataset context injection with semantic vector similarity search using cosine distance, retrieving only top-k relevant entities per query.
## 🔍 Problem Statement
Current implementation performs context serialization of entire task and ticket collections into LLM prompts regardless of query relevance. The AI service takes all user tasks and tickets as string context before each inference call, resulting in:
- Average prompt size: 2500 tokens (80% from task/ticket serialization)
- Gemini API latency: 3-4 seconds due to large context processing
- Context window overflow at approximately 500 entities
- Zero semantic filtering - irrelevant entities pollute prompt context
Meeting entities already leverage vector embeddings stored in `summary_embedding vector(768)` with vector indexing and RPC-based similarity search
## 🎯 Expected Outcome
- Augment `tasks` and `tickets` schemas with `description_embedding vector(768)` columns
- Implement automatic embedding generation pipeline via Supabase Edge Functions usin embedding model.
- Refactor AI service to perform query embedding generation and vector space retrieval before LLM inference
- Token budget reduction: 2500 → 300 per request (88% decrease)
## 📷 Screenshots and Design Ideas
## 📋 Additional Context
### Record
- [x] I agree to follow this project's Code of Conduct
- [ ] I want to work on implementing this feature
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.