Skip to content

Knowledge & Grounding

Three components that provide domain knowledge, affordance reasoning, and adaptive memory -- grounding G6's inference in retrieved corpus facts rather than unsupported generation.

Overview

Grounding is G6's primary defence against hallucination. The grounding component ships with a built-in knowledge base of seed facts across seven domains (AI/ML, mathematics, engineering, medicine, logic, finance, general), each containing 8-10 curated seed facts. TF-IDF retrieval over this knowledge base returns facts with a confidence score -- the mean similarity between the query and the retrieved facts (TF-IDF cosine, or keyword overlap in the fallback path). Read it as a retrieval-quality signal: it measures how textually close the retrieved facts are to the query, not whether a downstream claim is true or relevant to the user's actual problem.

affordance_kb extends grounding into simulation action space -- tracking example object properties, affordances, constraints, and simulated interaction history. It is useful for Physical AI demos and planning examples, but it is not a production robot-control or hardware-safety layer.

adapt_memory provides two memory surfaces. The simple AdaptMemoryBlock offers session-local key-value memory backed by an in-process state dictionary. The launch-facing MCP path is memory_mcp, a SQLite-backed memory server for durable recall across restarts and multi-session workflows, with general, episodic, semantic, procedural, relational, STM/LTM, working-memory, and search operations. For non-technical user workflows, prefer memory_mcp; use the in-process block for short-lived pipeline state.

Components

Component Description MCP Tools
grounding Domain knowledge base with TF-IDF retrieval --
affordance_kb Simulation object affordance KB with grip hints and interaction stats --
adapt_memory SQLite-backed MCP memory plus lightweight session-local key-value memory 22

Architecture

graph TD
    GND[grounding] --> KB[Built-in KB<br/>7 domains]
    GND --> TFIDF[TF-IDF Retrieval]
    AFF[affordance_kb] --> GND
    MEM[adapt_memory] --> STATE[State Dict<br/>Tier 1]
    MEM --> SQLITE[SQLite memory_mcp<br/>Launch-facing]
    CTX[Context & Retrieval] --> GND
    CTX --> MEM
    AGENTS[Agents & LLM] --> MEM
    PHYS[Physical AI] --> AFF

Key Patterns

Seed Knowledge. Each domain in the grounding KB contains 8-10 curated facts that are always available without external services. This ensures that even in offline or minimal deployments, G6 can perform basic domain reasoning. The seed facts act as a foundation that can be extended with retrieved context.

Confidence-Weighted Grounding. Retrieval results include a confidence score -- the mean TF-IDF similarity (keyword overlap in the fallback path) between the query and the retrieved facts. It reflects retrieval quality only: a low score means the query is textually far from the seed facts, which is a signal to seek more context -- not a measurement that the answer is wrong or the claim untrustworthy. Components consuming grounded facts can set a threshold to trigger that secondary retrieval.

Memory Surfaces. adapt_memory uses __post_init__ to initialize Tier 1 state as a plain dictionary, which avoids database dependencies for simple memory needs. For durable user-facing recall, use the memory_mcp server backed by SQLite so memories survive process restarts and MCP client sessions.