agentic_rag 0.1.1 copy "agentic_rag: ^0.1.1" to clipboard
agentic_rag: ^0.1.1 copied to clipboard

Retrieval-augmented generation for Dart: loading, chunking, dense and BM25 retrieval, rank fusion, re-ranking, cited answers and retrieval tools.

Changelog #

0.1.1 #

  • Tightened the package description. This one already scored full marks; the change keeps the wording consistent with its sibling packages, which did not.

0.1.0 #

Initial release of the retrieval layer.

Added #

  • ValuesRagDocument, DocumentChunk, RetrievedChunk and Citation. Kept separate so an answer can always say which document, and which part of it, a claim came from. Documents carry a stable content fingerprint.
  • ChunkingChunker port with BaseChunker supplying the identifier convention and metadata propagation; RecursiveChunker splitting at the strongest boundary that fits, MarkdownChunker splitting at headings and putting the heading path into the chunk text so heading terms stay searchable, and FixedSizeChunker as an honest baseline.
  • LoadingDocumentLoader port with TextDocumentLoader, MarkdownDocumentLoader (YAML front matter to metadata, first heading to title), HtmlDocumentLoader (dependency-free text extraction and entity decoding) and CompositeDocumentLoader. Nothing touches dart:io, so the package runs on the web.
  • IngestionRagIndexer, which chunks, embeds and writes; skips unchanged documents by fingerprint; deletes the stale tail a shortened document leaves behind; keeps a keyword index in step; and records one failure without abandoning the run.
  • RetrievalRetriever port; VectorRetriever over an EmbeddingIndex; KeywordRetriever with a real BM25 InMemoryKeywordIndex; HybridRetriever fusing rankings with reciprocal rank fusion, optionally weighted; and NeighbourExpandingRetriever for adjacent-chunk context.
  • Re-rankingReranker port; ScoreFloorReranker, MmrReranker for diversity (refusing to run without vectors rather than degrading silently), LlmReranker which falls back to the retriever's ordering on failure, and ChainedReranker for cheap-before-expensive ordering.
  • PipelineRagPipeline assembling numbered passages within a character budget, generating a cited answer, and resolving markers back to documents; RagContext reporting what it dropped and RagAnswer reporting whether the answer was grounded at all.
  • ToolssearchTool so an agent decides when to search, and answeringTool for a corpus that deserves its own specialist.
  • EventsDocumentsIndexed, ChunksRetrieved (carrying the identifiers that make an answer reproducible), ChunksReranked (carrying how many passages the step actually promoted) and AnswerGenerated (offered against used, the over-fetching signal).
2
likes
160
points
133
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Retrieval-augmented generation for Dart: loading, chunking, dense and BM25 retrieval, rank fusion, re-ranking, cited answers and retrieval tools.

Repository (GitHub)
View/report issues
Contributing

Topics

#ai #rag #retrieval #embeddings #agentic

License

MIT (license)

Dependencies

agentic_core, agentic_llm, agentic_tools, agentic_vector, meta

More

Packages that depend on agentic_rag