Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Community Apps Dependencies | Show |
Lines of code | 6766 |
Technical Name |
llm_rag |
License | LGPL-3 |
Website | https://github.com/apexive/odoo-llm |
LLM RAG - Retrieval Augmented Generation
A comprehensive solution for implementing Retrieval Augmented Generation in Odoo
What is RAG? Retrieval Augmented Generation (RAG) enhances Large Language Models by retrieving relevant information from a knowledge base before generating responses, improving accuracy and providing up-to-date information.
Key Features
Document Management
Complete system for organizing, tracking, and processing documents for RAG:
- Document status tracking
- Document versioning
- Attachment handling
- Activity logging
Vector Search
Advanced semantic search capabilities:
- Integration with PostgreSQL pgvector
- Cosine similarity matching
- Optimized vector indices
- Hybrid search capabilities
User Interface
Intuitive interfaces for managing the RAG process:
- Document creation wizard
- RAG search interface
- Document processing dashboard
- Results visualization
Complete RAG Pipeline
The module implements a full end-to-end pipeline for processing documents:
Retrieve
Extract document content from source records
Parse
Convert to standardized format (markdown)
Chunk
Split into semantic segments
Embed
Create vector representations
Extensible Architecture
The module is designed to be highly extensible, allowing developers to customize each step of the RAG pipeline:
Component | Purpose | How to Extend |
---|---|---|
Retrievers | Extract content from different record types | Extend _get_available_retrievers method and implement a custom retriever method |
Parsers | Process different file formats (PDF, text, etc.) | Extend _get_available_parsers method and implement a custom parser method |
Chunkers | Implement different document segmentation algorithms | Extend _get_available_chunkers method and implement a custom chunker method |
Embedders | Integrate with different embedding models | Configure via the embedding model selection |
Integration Points
The module can be integrated with other Odoo models through:
- Server Actions: Pre-configured actions for creating RAG documents from any record
- Model Extensions: Add RAG capabilities to any model by implementing the
rag_retrieve
method - API Access: Programmatic access to the RAG pipeline through the Odoo API
PDF Processing: The module includes advanced PDF handling capabilities through PyMuPDF, including text extraction and image handling.
Getting Started
Installation
Install the module and its dependencies:
- Install the base
llm
andllm_pgvector
modules - Install Python dependencies:
PyMuPDF
andnumpy
- Install the
llm_rag
module
Configuration
Set up your embedding models and configure the RAG pipeline:
- Configure embedding models in the LLM settings
- Select default parsers, chunkers, and other pipeline options
- Create your first RAG documents
Please log in to comment on this module