コンテンツにスキップ

Agent Knowledge (RAG)

このコンテンツはまだ日本語訳がありません。

Give an agentic worker its own knowledge corpus — a set of documents (PDFs, text) the worker retrieves from automatically. Before each LLM call the worker searches the corpus and injects the most relevant passages as a <knowledge> block in the system prompt. This is retrieval-augmented generation (RAG) as auto pre-retrieval: the model always sees grounded context, without you wiring a retrieval tool by hand.

  1. Attach documents to the worker. They are extracted, chunked, and baked into the worker’s .gtpack as a corpus — the pack is self-contained.
  2. At runtime, each turn: the worker embeds the query, searches the corpus for the top top_k passages, and prepends them to the prompt (after any long-term memory facts).
  3. The model answers grounded in the retrieved passages.
AgentConfig.knowledge
"knowledge": {
"provider": "chronicle", // cap://dw.knowledge
"embedding": { "provider": "openai", "model": "text-embedding-3-small" }, // cap://dw.embedding
"top_k": 5
}
  • provider — the knowledge store capability (cap://dw.knowledge), e.g. Chronicle.
  • embedding — the embedding provider (cap://dw.embedding) used to index the corpus and embed queries.
  • top_k — how many passages to retrieve per turn (default 5).

Knowledge retrieval is opt-in at the runner build, the same as long-term memory: the runner must be built with the knowledge-chronicle feature, and retrieval stays silently disabled unless the embedding environment is set. An unconfigured tier never fails startup — the worker just answers without retrieval.

VariablePurpose
GREENTIC_KNOWLEDGE_EMBED_BASE_URLEmbedding API base URL.
GREENTIC_KNOWLEDGE_EMBED_API_KEYEmbedding API key.
GREENTIC_KNOWLEDGE_EMBED_MODELEmbedding model.
GREENTIC_KNOWLEDGE_BACKENDGraph/vector store (defaults to embedded SurrealDB).

In the Designer, manage a reusable tenant knowledge library (upload and manage PDFs), then attach documents to a worker in the composer’s Knowledge section; the corpus is emitted into the worker’s pack.