API Reference Arcana v#2.0.1

Copy Markdown View Source

Modules

RAG (Retrieval Augmented Generation) library for Elixir.

Deprecated. Use Arcana.Pipeline instead.

RAG (Retrieval Augmented Generation) question answering.

Schema for document chunks with embeddings.

Behaviour for text chunking providers used by Arcana.

Custom chunking provider using user-provided functions.

Default text chunker using the text_chunker library.

Represents a collection of documents for segmentation.

Configuration management for Arcana.

Wrapper struct for config values that redacts sensitive data on inspect.

Schema for documents stored in Arcana.

Behaviour for embedding providers used by Arcana.

Custom embedding provider using user-provided functions.

Local embedding provider using Bumblebee and Nx.Serving.

OpenAI embedding provider using Req.LLM.

Nx.Serving for text embeddings using Bumblebee.

Retrieval evaluation for measuring search quality.

Evaluates answer quality using LLM-as-judge.

Generates synthetic test cases from existing chunks.

Computes retrieval evaluation metrics.

An evaluation run containing metrics and per-case results.

A test case for retrieval evaluation.

Behaviour for PDF parsing providers.

PDF parser using poppler's pdftotext command.

GraphRAG (Graph-enhanced Retrieval Augmented Generation) for Arcana.

Schema for knowledge graph communities.

Behaviour for community detection in GraphRAG.

Leiden algorithm implementation for community detection.

Behaviour for community summarization in GraphRAG.

LLM-based community summarizer.

Schema for knowledge graph entities.

Behaviour for entity extraction in GraphRAG.

LLM-based entity extraction implementation.

Extracts named entities from text using Bumblebee NER.

Behaviour for matching query text to entities in the graph.

Entity matcher that uses embedding similarity against entity descriptions.

Entity matcher that extracts entity names from the query and looks them up by exact name match in the graph.

Schema for tracking where entities appear in chunks.

Combines vector search and graph-based search using Reciprocal Rank Fusion.

Builds knowledge graph data from document chunks.

Behaviour for combined entity and relationship extraction in GraphRAG.

LLM-based combined entity and relationship extraction.

Queries the knowledge graph for entities, relationships, and community summaries.

Behaviour and dispatch module for graph storage backends.

Ecto/PostgreSQL implementation of the GraphStore behaviour.

In-memory implementation of the GraphStore behaviour.

Lazy-loaded Nx.Serving for Named Entity Recognition using Bumblebee.

Schema for knowledge graph relationships between entities.

Behaviour for relationship extraction in GraphRAG.

LLM-based relationship extraction implementation.

Behaviour for grounding analysis on LLM-generated answers.

Default grounder using Hallmark (Vectara HHEM via Bumblebee).

LLM-as-judge grounder using atomic claim decomposition.

Attributes grounding spans to source chunks using word overlap scoring.

Lazy-loaded NLI serving for hallucination detection via Hallmark.

Formats context for grounding analysis.

Result of grounding analysis on an LLM-generated answer.

Document ingestion for Arcana.

Protocol for LLM adapters used by Arcana.

Agentic RAG via an LLM-driven tool loop.

State carried through an Arcana.Loop run.

Default system prompt for Arcana.Loop.

Default tool definitions and execution for Arcana.Loop.

Maintenance functions for Arcana.

Parses files into text content for ingestion.

Pipeline-based agentic RAG for Arcana.

Behaviour for answer generation in Arcana.Pipeline.

LLM-based answer generator.

Context struct that flows through Arcana.Pipeline.

Behaviour for query decomposition in Arcana.Pipeline.

LLM-based query decomposer.

Behaviour for query expansion in Arcana.Pipeline.

LLM-based query expander.

Behaviour for query rewriting in Arcana.Pipeline.

LLM-based query rewriter.

Behaviour for collection selection in Arcana.Pipeline.

LLM-based collection selector.

Behaviour for re-ranking search results.

ColBERT-style neural reranker using per-token embeddings and MaxSim scoring.

Local cross-encoder reranker using Bumblebee.

LLM-based re-ranker that scores chunk relevance in a single batched call.

Built-in query rewriter helpers for common rewriting strategies.

Search functionality for Arcana.

Behaviour for search execution in Arcana.Pipeline.

Default searcher using Arcana's built-in pgvector search.

Task supervisor for async operations in Arcana.

Telemetry events emitted by Arcana.

Ready-to-use telemetry logger for Arcana events.

Behaviour and dispatch module for vector storage backends.

In-memory vector store using HNSWLib for approximate nearest neighbor search.

PostgreSQL pgvector-backed vector store.

LiveView for asking questions about documents in Arcana.

Shared component for rendering retrieved chunks across the Advanced, Pipeline, and Loop sub-tabs of the Ask dashboard.

LiveView for managing collections in Arcana.

Shared components for the Arcana dashboard.

Redirects to the Documents page.

LiveView for managing documents in Arcana.

LiveView for retrieval evaluation in Arcana.

LiveView for exploring the GraphRAG knowledge graph.

LiveView for displaying Arcana configuration info.

LiveView for maintenance operations in Arcana.

Provides LiveView routing for the Arcana dashboard.

LiveView for searching documents in Arcana.

Mix Tasks

Generates synthetic test cases from existing chunks.

Runs evaluation and prints metrics.

Generates a migration to update vector column dimensions.

Detects communities in the knowledge graph using the Leiden algorithm.

Generates embeddings for entity descriptions.

Generates the migration for GraphRAG tables.

Rebuilds the knowledge graph for all documents.

Generates LLM summaries for knowledge graph communities.

Installs Arcana in your Phoenix application.

Re-embeds all chunks with the current embedding configuration.