A library to build RAG (Retrieval Augmented Generation) systems in Elixir.
If available in Hex, the package can be installed
by adding rag
to your list of dependencies in mix.exs
:
def deps do
[
{:rag, "~> 0.1.0"}
]
end
Then, run mix rag.install --vector-store <vector_store>
to install required dependencies and generate a RAG system that you can further customize to your needs.
Currently supported options for <vector_store>
:
pgvector
chroma
Brought to you by bitcrowd.
RAG (Retrieval-Augmented Generation) is a enhances the capabilities of language models by combining retrieval-based and generative approaches. Traditional language models often struggle with the following problems:
- Knowledge Cutoff: Their knowledge is limited to a fixed point in time, making it difficult to provide up-to-date information.
- Hallucinations: They may generate information that sounds confident but is entirely made up, leading to inaccurate responses.
- Contextual Relevance: They struggle to provide responses that are contextually relevant to the user's query.
RAG addresses these issues by retrieving relevant information from an external knowledge source before generating a response. This retrieval-augmented approach ensures that the generated content is informed by the most current data, reducing the likelihood of hallucinations and improving the overall quality of the responses. By integrating retrieval with generation, RAG enables more reliable and contextually relevant interactions, making it a valuable tool for applications that require accurate and informative language generation.