Skip to content

feat(comprehension): ingestion-time LLM digests so ask/chat answer structure + combination questions - #1158

Draft
northdpole wants to merge 3 commits into
fix/ask-embedding-retrievalfrom
feat/ingest-comprehension
Draft

northdpole wants to merge 3 commits into
fix/ask-embedding-retrievalfrom
feat/ingest-comprehension

Conversation

@northdpole

Copy link
Copy Markdown
Collaborator

Stacked on #1155.

Why

#1155 answered structural questions (e.g. SAMM levels) from hand-written facts, which cannot scale and was partly wrong. This derives that knowledge at ingestion instead.

How

  • application/utils/comprehension/: reads whole harvested documents, extracts claims that must include a verbatim quote found in the source (unverified claims dropped), builds a per-standard overview that must cite existing documents, and stores everything as embedded evidence docs in the existing agent channel.
  • Query time: router hook synthesizes an answer from the top comprehension hits with citations; UNKNOWN falls through to existing paths. Flag: OWASP_COMPREHENSION_ENABLED (default on).
  • scripts/comprehend_standard.py --repo OWASP/SAMM runs it per harvested repo.
  • Design note: docs/oie/comprehension-design.md.

Verified on staging (homeserver)

SAMM/ASVS/MASVS/AI guide digested; e.g. "how many levels in owasp samm" returns three maturity levels per practice (also surfaces a v1.5 vs v2 conflict, to fix by preferring the latest version), with GitHub citations.

Not done yet

Generated source-grounded eval (Gemini questions, Claude judge), held-out standard test, version preference, removal of hand-written node_facts, people/talks layer, scheduling into the pipeline.

🤖 Generated with Claude Code

…es at ingestion

Replace hand-curated structural facts with LLM comprehension of harvested
standards. Per-document claims must carry a verbatim quote found in the source;
a per-standard overview must cite existing documents. Results are embedded as
evidence docs in the existing agent channel; at query time the router
synthesizes an answer from the top comprehension hits and strips uncited
output (UNKNOWN falls through).

- application/utils/comprehension: sources, digest, store, synthesize, answer
- scripts/comprehend_standard.py: run for one harvested repo
- router hook behind OWASP_COMPREHENSION_ENABLED (default on)
- design note: docs/oie/comprehension-design.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

northdpole and others added 2 commits October 17, 2026 19:10
…, prefer latest version, overview-first ordering

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant