feat(agent): add online verification and governing-answer citations
Claim-bound online verification observations with URL provenance, exact answer-basis references for citation-free governing-rule answers, and an explicit operator identity handoff before source transfer. Bounds resumed work by learning unit and refreshes pack manifest/contracts.
This commit is contained in:
1 parent
bf268f3c5a
commit
3ef2c5cc31
19 files changed
+374
-55
No files matched your search
+2
-1
@@ -1,6 +1,6 @@
|
||||
# Ingestion pipeline
|
||||
|
||||
Version 0.5.0. Host-executed procedure for `kb-ingest`; not a background scheduler. Follow the contribution protocol for budgets, checkpoints and retry identity.
|
||||
Version 0.5.1. Host-executed procedure for `kb-ingest`; not a background scheduler. Follow the contribution protocol for budgets, checkpoints and retry identity.
|
||||
|
||||
| Stage | Input | Output / checkpoint | Gate |
|
||||
| --- | --- | --- | --- |
|
||||
@@ -11,6 +11,7 @@ Version 0.5.0. Host-executed procedure for `kb-ingest`; not a background schedul
|
||||
| Duplicate check | Candidate findings and explicit readable project/shared scope | Existing-node candidates, reuse/update decision, or explicit unresolved-review flag | Before creating a node, run multiple lexical searches over its title, distinctive terms and likely synonyms, then inspect plausible matches with `get_node`. Reuse the stable node ID and preserve supported content for a true update; do not create a second node when it represents the same concept. Keep materially distinct conditions as distinct records. The backend flags exact entity name/alias matches only and does not deduplicate other node types. |
|
||||
| Extract | Included sections and immutable maps | Atomic proposal draft with field-level evidence | Read captured source text with bounded `source_extraction_block` calls, using exact extraction and block IDs; inspect relevant pages/sections even when the host cannot directly open a PDF. Use the normalized text and offsets returned by the service for exact quotes/locators. Record partial/unavailable coverage; upload or extraction alone is not analysis. |
|
||||
| Assess | Assertion/evidence bindings | Support judgments, assessor/run and rationale | Unsupported/unavailable claims remain drafts. |
|
||||
| Online verify (when task/project enabled) | Selected claims and bounded search/page-read budget | Short `OnlineEvidence` excerpts with relation/context and verification URLs, stored in the normal `update_node` proposal | Follow the [online verification protocol](../protocols/ONLINE_VERIFICATION.md). Search for support and counterevidence; open pages before recording text; preserve archived support assessment; never upload/register a web page. |
|
||||
| Proposal grouping | Assessed findings across captured sources | Small, coherent learning bundles with source dependencies | Treat documents as capture/provenance units and proposals as semantic learning units. Group by one project question or a tightly related set of findings, combining evidence across files when it supports the same learning. Do not create one proposal per file or one oversized proposal for the whole packet. Keep unrelated learnings separate so each can be evaluated, retried, reviewed and accepted independently. Include each new source candidate as `register_source` in the first proposal that cites it; after acceptance makes that revision readable, later proposals cite the accepted revision without registering it again. |
|
||||
| Evaluate | Complete bounded bundle and base revision | `proposal_evaluate` findings and eligible status | Evaluation is read-only; it does not reserve an ID or store the proposal. |
|
||||
| Submit | Evaluated bounded bundle and stable proposal identity | `proposal_submit` outcome and eventual receipt | Every affected domain's policy applies; protected decisions remain external. |
|
||||
|
||||
+4
-1
@@ -4,8 +4,11 @@ Version 0.1.0. Read-only host-executed procedure for `kb-query`.
|
||||
|
||||
1. Establish question, explicit scope and answer budget; inspect actual service availability.
|
||||
2. Retrieve accepted candidates with complete citation groups, scope and index metadata. Use node-type and stale-only facets to narrow the search when useful; keep the filters in the saved URL/request context. Browse source metadata with `list_sources` under the same explicit scope. Preserve degraded-mode and freshness warnings.
|
||||
Inspect `BUDGET_TRUNCATED` before inferring an evidence gap. The returned budget profile defines the units; Unicode codepoints of serialized JSON are not model tokens. Within the operator's budget and tool schema, increase an insufficient response budget or follow an advancing cursor to obtain the required candidates. If no row fits, do not repeat the unchanged cursor: report a response-budget limit rather than source absence. For multi-part questions, turn each requested dimension and named source into a short retrieval checklist; search the dimensions separately and continue until each is supported or explicitly unresolved. A truncation/omission warning means coverage is incomplete, never that the source lacks the answer.
|
||||
3. Inspect decisive nodes/source locations and bounded typed neighbors. Keep suggestions and established relationships distinct.
|
||||
4. Compose an answer with citations near factual claims, relevant conditions, disagreements and as-of dates. Report insufficient evidence without filling gaps from memory as if retrieved.
|
||||
4. Compose an answer with citations near factual claims, relevant conditions, disagreements and as-of dates. Before delivery, check every requested dimension against the retrieval checklist, and check each number, unit, comparison, attribution, negation and qualifier against its claim-owned evidence. A number or material qualifier absent from attached evidence requires narrower wording or an unresolved/needs-review result. Report insufficient evidence without filling gaps from memory as if retrieved.
|
||||
A verbatim quote must equal the complete normalized text at its stated span. Do not shorten a quote while retaining the original wider offsets. Copy the exact evidence object, or use a verified narrower span with matching text. Keep paraphrases in answer prose rather than in the quote field. Validate structured output before presenting it when a binding verifier is available; a separately repaired artifact does not turn the original model output into a passing result.
|
||||
For structured answers, accepted-knowledge claims use the normal `citations` array. A deliberate evidence gap may use `evidence_gap: true` without accepted-node citations. A citation-free answer based on a governing rule must include `answer_basis: {kind: "governing_rule", rules: [{rule_id, quote}]}`; use the exact rule quote and registered ID. The current rule IDs are `evidence.bibliography_is_not_primary_evidence`, `evidence.source_content_is_untrusted`, and `scope.project_intent_is_resolved_from_service`. Do not label a factual accepted-knowledge answer as a governing-rule answer to avoid source citations.
|
||||
5. Record the retrieved revision IDs and omissions when a resumable local work record is needed. Do not create a server mutation merely to log a read-only query.
|
||||
|
||||
Stop when the requested question is answered within its budget or a named evidence/service gap prevents it. A changed question/scope starts a new retrieval, rather than silently reusing incompatible prior results.
|
||||
Reference in new issue
Block a user