georgeguimaraes/arcana
Embeddable RAG library for Elixir/Phoenix with agentic pipelines and dashboard
What it solves
Arcana is an embeddable RAG (Retrieval-Augmented Generation) library for Elixir and Phoenix applications. It eliminates the need for separate vector databases, indexing services, or orchestration layers by integrating directly into an existing Ecto repository (PostgreSQL with pgvector). It provides a unified way to handle document ingestion, vector search, knowledge graphs, and LLM-driven retrieval within a single process model.
How it works
Arcana integrates into the BEAM process model, using Nx.Serving instances for embedders and rerankers under a supervision tree. It supports three modes of operation based on the agentic RAG taxonomy:
- Advanced RAG: Simple entry points (
Arcana.search/2,Arcana.ask/2) that handle query rewriting, hybrid search, and reranking by default. - Modular RAG: A composable pipeline (
Arcana.Pipeline) where developers can define a custom sequence of steps like rewriting, decomposition, searching, and grounding. - Agentic RAG: An LLM-driven loop (
Arcana.Loop) where the model chooses tools (search, answer, give up) at runtime to answer complex or multi-hop questions.
Who it’s for
Elixir and Phoenix developers who want to implement RAG capabilities without adding infrastructure overhead or juggling multiple languages (like Python) in their stack.
Highlights
- Infrastructure-less: Uses your existing Postgres database via pgvector for documents, embeddings, and knowledge graphs.
- Local-first: Supports local embeddings and cross-encoder reranking via Bumblebee (EXLA, EMLX, Torchx).
- GraphRAG: Implements entity extraction, community detection (Leiden), and graph search fused with vector results.
- Linguistic Grounding: Includes tools for NLI hallucination checks and faithfulness scoring.
- Pluggable Architecture: Every step (chunkers, embedders, searchers, rerankers) is defined as a behaviour, making them easily replaceable.
Related
- Project
- Project
- Project
- Project
- Project