# Arcana v2.0.1 - Table of Contents

> RAG (Retrieval Augmented Generation) library for Elixir

## Pages

- [Arcana 🔮📚](readme.md)

- Guides
  - [Getting Started with Arcana 🔮📚](getting-started.md)
  - [LLM Integration](llm-integration.md)
  - [Pipeline (Modular RAG)](pipeline.md)
  - [Loop (Agentic RAG)](loop.md)
  - [GraphRAG](graphrag.md)
  - [Search Algorithms](search-algorithms.md)
  - [Re-ranking](reranking.md)
  - [Evaluation](evaluation.md)
  - [Telemetry and Observability](telemetry.md)
  - [Dashboard](dashboard.md)

## Modules

- [Arcana.Agent](Arcana.Agent.md): Deprecated. Use `Arcana.Pipeline` instead.
- [Arcana.Ask](Arcana.Ask.md): RAG (Retrieval Augmented Generation) question answering.
- [Arcana.Chunker.Custom](Arcana.Chunker.Custom.md): Custom chunking provider using user-provided functions.
- [Arcana.Chunker.Default](Arcana.Chunker.Default.md): Default text chunker using the text_chunker library.
- [Arcana.Collection](Arcana.Collection.md): Represents a collection of documents for segmentation.
- [Arcana.Config](Arcana.Config.md): Configuration management for Arcana.
- [Arcana.Config.Redacted](Arcana.Config.Redacted.md): Wrapper struct for config values that redacts sensitive data on inspect.
- [Arcana.Embedder](Arcana.Embedder.md): Behaviour for embedding providers used by Arcana.
- [Arcana.Embedder.Custom](Arcana.Embedder.Custom.md): Custom embedding provider using user-provided functions.
- [Arcana.Embedder.Local](Arcana.Embedder.Local.md): Local embedding provider using Bumblebee and Nx.Serving.
- [Arcana.Embedder.OpenAI](Arcana.Embedder.OpenAI.md): OpenAI embedding provider using Req.LLM.
- [Arcana.Evaluation](Arcana.Evaluation.md): Retrieval evaluation for measuring search quality.
- [Arcana.Evaluation.AnswerMetrics](Arcana.Evaluation.AnswerMetrics.md): Evaluates answer quality using LLM-as-judge.
- [Arcana.Evaluation.Generator](Arcana.Evaluation.Generator.md): Generates synthetic test cases from existing chunks.
- [Arcana.Evaluation.Metrics](Arcana.Evaluation.Metrics.md): Computes retrieval evaluation metrics.
- [Arcana.Evaluation.Run](Arcana.Evaluation.Run.md): An evaluation run containing metrics and per-case results.
- [Arcana.Evaluation.TestCase](Arcana.Evaluation.TestCase.md): A test case for retrieval evaluation.
- [Arcana.FileParser.PDF](Arcana.FileParser.PDF.md): Behaviour for PDF parsing providers.
- [Arcana.FileParser.PDF.Poppler](Arcana.FileParser.PDF.Poppler.md): PDF parser using poppler's `pdftotext` command.
- [Arcana.Graph](Arcana.Graph.md): GraphRAG (Graph-enhanced Retrieval Augmented Generation) for Arcana.
- [Arcana.Graph.Community](Arcana.Graph.Community.md): Schema for knowledge graph communities.
- [Arcana.Graph.CommunityDetector](Arcana.Graph.CommunityDetector.md): Behaviour for community detection in GraphRAG.
- [Arcana.Graph.CommunityDetector.Leiden](Arcana.Graph.CommunityDetector.Leiden.md): Leiden algorithm implementation for community detection.
- [Arcana.Graph.CommunitySummarizer](Arcana.Graph.CommunitySummarizer.md): Behaviour for community summarization in GraphRAG.
- [Arcana.Graph.CommunitySummarizer.LLM](Arcana.Graph.CommunitySummarizer.LLM.md): LLM-based community summarizer.
- [Arcana.Graph.Entity](Arcana.Graph.Entity.md): Schema for knowledge graph entities.
- [Arcana.Graph.EntityExtractor](Arcana.Graph.EntityExtractor.md): Behaviour for entity extraction in GraphRAG.
- [Arcana.Graph.EntityExtractor.LLM](Arcana.Graph.EntityExtractor.LLM.md): LLM-based entity extraction implementation.
- [Arcana.Graph.EntityExtractor.NER](Arcana.Graph.EntityExtractor.NER.md): Extracts named entities from text using Bumblebee NER.
- [Arcana.Graph.EntityMatcher](Arcana.Graph.EntityMatcher.md): Behaviour for matching query text to entities in the graph.
- [Arcana.Graph.EntityMatcher.Embedding](Arcana.Graph.EntityMatcher.Embedding.md): Entity matcher that uses embedding similarity against entity descriptions.
- [Arcana.Graph.EntityMatcher.NER](Arcana.Graph.EntityMatcher.NER.md): Entity matcher that extracts entity names from the query and looks them
up by exact name match in the graph.
- [Arcana.Graph.EntityMention](Arcana.Graph.EntityMention.md): Schema for tracking where entities appear in chunks.
- [Arcana.Graph.FusionSearch](Arcana.Graph.FusionSearch.md): Combines vector search and graph-based search using Reciprocal Rank Fusion.
- [Arcana.Graph.GraphBuilder](Arcana.Graph.GraphBuilder.md): Builds knowledge graph data from document chunks.
- [Arcana.Graph.GraphExtractor](Arcana.Graph.GraphExtractor.md): Behaviour for combined entity and relationship extraction in GraphRAG.
- [Arcana.Graph.GraphExtractor.LLM](Arcana.Graph.GraphExtractor.LLM.md): LLM-based combined entity and relationship extraction.
- [Arcana.Graph.GraphQuery](Arcana.Graph.GraphQuery.md): Queries the knowledge graph for entities, relationships, and community summaries.
- [Arcana.Graph.GraphStore](Arcana.Graph.GraphStore.md): Behaviour and dispatch module for graph storage backends.
- [Arcana.Graph.GraphStore.Ecto](Arcana.Graph.GraphStore.Ecto.md): Ecto/PostgreSQL implementation of the GraphStore behaviour.
- [Arcana.Graph.GraphStore.Memory](Arcana.Graph.GraphStore.Memory.md): In-memory implementation of the GraphStore behaviour.
- [Arcana.Graph.NERServing](Arcana.Graph.NERServing.md): Lazy-loaded Nx.Serving for Named Entity Recognition using Bumblebee.
- [Arcana.Graph.Relationship](Arcana.Graph.Relationship.md): Schema for knowledge graph relationships between entities.
- [Arcana.Graph.RelationshipExtractor](Arcana.Graph.RelationshipExtractor.md): Behaviour for relationship extraction in GraphRAG.
- [Arcana.Graph.RelationshipExtractor.LLM](Arcana.Graph.RelationshipExtractor.LLM.md): LLM-based relationship extraction implementation.
- [Arcana.Grounder](Arcana.Grounder.md): Behaviour for grounding analysis on LLM-generated answers.
- [Arcana.Grounder.Hallmark](Arcana.Grounder.Hallmark.md): Default grounder using Hallmark (Vectara HHEM via Bumblebee).
- [Arcana.Grounder.LLMJudge](Arcana.Grounder.LLMJudge.md): LLM-as-judge grounder using atomic claim decomposition.
- [Arcana.Grounding.Attribution](Arcana.Grounding.Attribution.md): Attributes grounding spans to source chunks using word overlap scoring.
- [Arcana.Grounding.HallmarkServing](Arcana.Grounding.HallmarkServing.md): Lazy-loaded NLI serving for hallucination detection via Hallmark.
- [Arcana.Grounding.InputFormatter](Arcana.Grounding.InputFormatter.md): Formats context for grounding analysis.
- [Arcana.Grounding.Result](Arcana.Grounding.Result.md): Result of grounding analysis on an LLM-generated answer.
- [Arcana.Ingest](Arcana.Ingest.md): Document ingestion for Arcana.
- [Arcana.LLM](Arcana.LLM.md): Protocol for LLM adapters used by Arcana.
- [Arcana.Loop](Arcana.Loop.md): Agentic RAG via an LLM-driven tool loop.
- [Arcana.Loop.Context](Arcana.Loop.Context.md): State carried through an `Arcana.Loop` run.
- [Arcana.Loop.SystemPrompt](Arcana.Loop.SystemPrompt.md): Default system prompt for `Arcana.Loop`.
- [Arcana.Loop.Tools](Arcana.Loop.Tools.md): Default tool definitions and execution for `Arcana.Loop`.
- [Arcana.Maintenance](Arcana.Maintenance.md): Maintenance functions for Arcana.
- [Arcana.Parser](Arcana.Parser.md): Parses files into text content for ingestion.
- [Arcana.Pipeline](Arcana.Pipeline.md): Pipeline-based agentic RAG for Arcana.
- [Arcana.Pipeline.Answerer](Arcana.Pipeline.Answerer.md): Behaviour for answer generation in `Arcana.Pipeline`.
- [Arcana.Pipeline.Answerer.LLM](Arcana.Pipeline.Answerer.LLM.md): LLM-based answer generator.
- [Arcana.Pipeline.Context](Arcana.Pipeline.Context.md): Context struct that flows through `Arcana.Pipeline`.
- [Arcana.Pipeline.Decomposer](Arcana.Pipeline.Decomposer.md): Behaviour for query decomposition in `Arcana.Pipeline`.
- [Arcana.Pipeline.Decomposer.LLM](Arcana.Pipeline.Decomposer.LLM.md): LLM-based query decomposer.
- [Arcana.Pipeline.Expander](Arcana.Pipeline.Expander.md): Behaviour for query expansion in `Arcana.Pipeline`.
- [Arcana.Pipeline.Expander.LLM](Arcana.Pipeline.Expander.LLM.md): LLM-based query expander.
- [Arcana.Pipeline.Rewriter](Arcana.Pipeline.Rewriter.md): Behaviour for query rewriting in `Arcana.Pipeline`.
- [Arcana.Pipeline.Rewriter.LLM](Arcana.Pipeline.Rewriter.LLM.md): LLM-based query rewriter.
- [Arcana.Pipeline.Selector](Arcana.Pipeline.Selector.md): Behaviour for collection selection in `Arcana.Pipeline`.
- [Arcana.Pipeline.Selector.LLM](Arcana.Pipeline.Selector.LLM.md): LLM-based collection selector.
- [Arcana.Reranker](Arcana.Reranker.md): Behaviour for re-ranking search results.
- [Arcana.Reranker.ColBERT](Arcana.Reranker.ColBERT.md): ColBERT-style neural reranker using per-token embeddings and MaxSim scoring.
- [Arcana.Reranker.CrossEncoder](Arcana.Reranker.CrossEncoder.md): Local cross-encoder reranker using Bumblebee.
- [Arcana.Reranker.LLM](Arcana.Reranker.LLM.md): LLM-based re-ranker that scores chunk relevance in a single batched call.
- [Arcana.Search](Arcana.Search.md): Search functionality for Arcana.
- [Arcana.Searcher](Arcana.Searcher.md): Behaviour for search execution in `Arcana.Pipeline`.
- [Arcana.Searcher.Arcana](Arcana.Searcher.Arcana.md): Default searcher using Arcana's built-in pgvector search.
- [Arcana.TaskSupervisor](Arcana.TaskSupervisor.md): Task supervisor for async operations in Arcana.
- [Arcana.Telemetry](Arcana.Telemetry.md): Telemetry events emitted by Arcana.
- [Arcana.Telemetry.Logger](Arcana.Telemetry.Logger.md): Ready-to-use telemetry logger for Arcana events.
- [Arcana.VectorStore](Arcana.VectorStore.md): Behaviour and dispatch module for vector storage backends.
- [Arcana.VectorStore.Memory](Arcana.VectorStore.Memory.md): In-memory vector store using HNSWLib for approximate nearest neighbor search.
- [Arcana.VectorStore.Pgvector](Arcana.VectorStore.Pgvector.md): PostgreSQL pgvector-backed vector store.
- [ArcanaWeb.AskLive](ArcanaWeb.AskLive.md): LiveView for asking questions about documents in Arcana.

- [ArcanaWeb.ChunkResultsComponent](ArcanaWeb.ChunkResultsComponent.md): Shared component for rendering retrieved chunks across the Advanced,
Pipeline, and Loop sub-tabs of the Ask dashboard.
- [ArcanaWeb.CollectionsLive](ArcanaWeb.CollectionsLive.md): LiveView for managing collections in Arcana.

- [ArcanaWeb.DashboardComponents](ArcanaWeb.DashboardComponents.md): Shared components for the Arcana dashboard.

- [ArcanaWeb.DocumentsLive](ArcanaWeb.DocumentsLive.md): LiveView for managing documents in Arcana.

- [ArcanaWeb.EvaluationLive](ArcanaWeb.EvaluationLive.md): LiveView for retrieval evaluation in Arcana.

- [ArcanaWeb.GraphLive](ArcanaWeb.GraphLive.md): LiveView for exploring the GraphRAG knowledge graph.
- [ArcanaWeb.InfoLive](ArcanaWeb.InfoLive.md): LiveView for displaying Arcana configuration info.

- [ArcanaWeb.MaintenanceLive](ArcanaWeb.MaintenanceLive.md): LiveView for maintenance operations in Arcana.

- [ArcanaWeb.Router](ArcanaWeb.Router.md): Provides LiveView routing for the Arcana dashboard.
- [ArcanaWeb.SearchLive](ArcanaWeb.SearchLive.md): LiveView for searching documents in Arcana.

- Core
  - [Arcana](Arcana.md): RAG (Retrieval Augmented Generation) library for Elixir.
  - [Arcana.Chunk](Arcana.Chunk.md): Schema for document chunks with embeddings.
  - [Arcana.Document](Arcana.Document.md): Schema for documents stored in Arcana.

- Utilities
  - [Arcana.Chunker](Arcana.Chunker.md): Behaviour for text chunking providers used by Arcana.
  - [Arcana.Rewriters](Arcana.Rewriters.md): Built-in query rewriter helpers for common rewriting strategies.

- Embeddings
  - [Arcana.Embeddings.Serving](Arcana.Embeddings.Serving.md): Nx.Serving for text embeddings using Bumblebee.

- LiveView UI
  - [ArcanaWeb.DashboardLive](ArcanaWeb.DashboardLive.md): Redirects to the Documents page.

## Mix Tasks

- [mix arcana.eval.generate](Mix.Tasks.Arcana.Eval.Generate.md): Generates synthetic test cases from existing chunks.
- [mix arcana.eval.run](Mix.Tasks.Arcana.Eval.Run.md): Runs evaluation and prints metrics.
- [mix arcana.gen.embedding_migration](Mix.Tasks.Arcana.Gen.EmbeddingMigration.md): Generates a migration to update vector column dimensions.
- [mix arcana.graph.detect_communities](Mix.Tasks.Arcana.Graph.DetectCommunities.md): Detects communities in the knowledge graph using the Leiden algorithm.
- [mix arcana.graph.embed_entities](Mix.Tasks.Arcana.Graph.EmbedEntities.md): Generates embeddings for entity descriptions.
- [mix arcana.graph.install](Mix.Tasks.Arcana.Graph.Install.md): Generates the migration for GraphRAG tables.
- [mix arcana.graph.rebuild](Mix.Tasks.Arcana.Graph.Rebuild.md): Rebuilds the knowledge graph for all documents.
- [mix arcana.graph.summarize_communities](Mix.Tasks.Arcana.Graph.SummarizeCommunities.md): Generates LLM summaries for knowledge graph communities.
- [mix arcana.install](Mix.Tasks.Arcana.Install.md): Installs Arcana in your Phoenix application.
- [mix arcana.reembed_chunks](Mix.Tasks.Arcana.ReembedChunks.md): Re-embeds all chunks with the current embedding configuration.

