Skip to content

Search and retrieve cited standard text

Use text search when no dedicated structured resolver covers the question or when a structured result needs a short cited explanation.

Structured lookup remains the preferred first step for tags, UIDs, graph relationships, VRs, transfer syntaxes, DICOMweb transactions, media types, templates, context groups, and codes.

Terminal window
EDITION=2025e # Replace with your concrete edition.
uv run dicom-kb search-text 'transfer syntax' \
--edition "$EDITION"

Restrict the search to one part:

Terminal window
EDITION=2025e # Replace with your concrete edition.
uv run dicom-kb search-text 'transfer syntax' \
--part PS3.6 \
--limit 10 \
--edition "$EDITION"

The default result limit is 10. Search returns structured matches with source locations that can be used for focused retrieval.

Use a DocBook xml:id, HTML anchor, or section number returned by search:

Terminal window
EDITION=2025e # Replace with your concrete edition.
SECTION_OR_ANCHOR='replace-with-search-result'
uv run dicom-kb retrieve-text PS3.6 "$SECTION_OR_ANCHOR" \
--edition "$EDITION"

The default maximum excerpt length is 800 characters. Override it explicitly:

Terminal window
EDITION=2025e # Replace with your concrete edition.
SECTION_OR_ANCHOR='replace-with-search-result'
uv run dicom-kb retrieve-text PS3.6 "$SECTION_OR_ANCHOR" \
--max-chars 1200 \
--edition "$EDITION"

A configuration profile or DICOM_KB_MAX_TEXT_EXCERPT_CHARS can supply the default when the CLI flag is absent.

Text search and retrieval are classified as explanatory evidence from retrieved text. Parse confidence is deliberately conservative.

Do not turn one excerpt into a structured rule without checking:

  • whether the section is normative or explanatory;
  • whether surrounding tables or conditions are required;
  • whether the edition matches the implementation under review;
  • whether a dedicated structured resolver already represents the fact.
  1. Call the narrowest structured resolver.
  2. Preserve its result, warnings, and references.
  3. Search within the most likely standard part.
  4. Select a matching section or anchor.
  5. Retrieve a bounded excerpt.
  6. Synthesize an answer that distinguishes the structured fact from the supporting prose.
  7. State any unresolved ambiguity.

Text retrieval is designed for short, local, citation-preserving excerpts. It is not a bulk export interface. Do not crawl every section, publish a full-text mirror, or include a generated text index in a public release.