Skip to main content

Crate phago_rag

Crate phago_rag 

Source
Expand description

§Phago RAG

Biological Retrieval-Augmented Generation.

Instead of vector similarity search, queries traverse the Hebbian knowledge graph following strongest connections. The graph learns from usage — frequently traversed paths strengthen, unused ones decay.

§How it differs from standard RAG

Standard RAGPhago RAG
Chunk → embed → vector searchDigest → wire → graph traversal
Static indexSelf-reinforcing graph
No learning from queriesTraversed paths strengthen
No anomaly detectionSentinels flag what doesn’t fit
Flat retrievalStructured, weighted paths

Re-exports§

pub use query::Query;
pub use query::QueryResult;
pub use query::QueryEngine;
pub use hybrid::hybrid_query;
pub use hybrid::HybridConfig;
pub use hybrid::HybridResult;
pub use mcp::phago_remember;
pub use mcp::phago_recall;
pub use mcp::phago_explore;

Modules§

baseline
Baseline retrieval methods for comparison against bio-rag.
code_query
Code-aware query interface.
hybrid
Hybrid scoring — TF-IDF candidate selection + graph structural re-ranking.
mcp
MCP Adapter — Model Context Protocol interface for Phago.
prelude
Phago RAG Prelude — convenient imports for common usage.
query
Query engine — traverses the Hebbian knowledge graph to retrieve relevant concepts.
scoring
Information retrieval scoring metrics.