aarondb/rag

Types

Rich Hickey 🧙🏾‍♂️: A macro expands high-level declarative intent into fundamental, composable data structures. This module avoids building a new “Graph RAG Engine”, instead mapping Semantic Intents purely into Datalog ASTs which AaronDB already computes efficiently.

pub type SemanticIntent {
  ConceptRecall(context: String, threshold: Float, limit: Int)
  ConnectedConcept(
    from_entity_id: Int,
    target_context: String,
    edge: String,
  )
  EvidenceGraph(
    entity_a_id: Int,
    entity_b_id: Int,
    max_depth: Int,
  )
}

Constructors

  • ConceptRecall(context: String, threshold: Float, limit: Int)

    Basic vector similarity recall

  • ConnectedConcept(
      from_entity_id: Int,
      target_context: String,
      edge: String,
    )

    Find shortest path between a known entity and a semantic concept

  • EvidenceGraph(entity_a_id: Int, entity_b_id: Int, max_depth: Int)

    Find evidence/reasoning supporting a connection

Values

pub fn build_query(intent: SemanticIntent) -> ast.Query

Compiles a semantic intent into a pure AaronDB Query AST. Time Complexity: O(1) AST generation. Space Complexity: O(1) AST size.

Search Document