# `Arcana.Ingest`
[🔗](https://github.com/georgeguimaraes/arcana/blob/main/lib/arcana/ingest.ex#L1)

Document ingestion for Arcana.

Handles chunking, embedding, and storing documents with optional
GraphRAG entity/relationship extraction.

# `ingest`

Ingests text content, creating a document with embedded chunks.

## Options

  * `:repo` - The Ecto repo to use (required)
  * `:source_id` - An optional identifier for grouping/filtering
  * `:metadata` - Optional map of metadata to store with the document
  * `:chunk_size` - Maximum chunk size in characters (default: 1024)
  * `:chunk_overlap` - Overlap between chunks (default: 200)
  * `:collection` - Collection name (string) or map with name and description (default: "default")
  * `:graph` - Enable GraphRAG extraction (default: from config)

# `ingest_file`

Ingests a file, parsing its content and creating a document with embedded chunks.

Supports multiple file formats including plain text, markdown, and PDF.

## Options

  * `:repo` - The Ecto repo to use (required)
  * `:source_id` - An optional identifier for grouping/filtering
  * `:metadata` - Optional map of metadata to store with the document
  * `:chunk_size` - Maximum chunk size in characters (default: 1024)
  * `:chunk_overlap` - Overlap between chunks (default: 200)
  * `:collection` - Collection name to organize the document (default: "default")

---

*Consult [api-reference.md](api-reference.md) for complete listing*
