Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/tudoumono/Sherpa/llms.txt

Use this file to discover all available pages before exploring further.

After a folder is ingested, Sherpa exposes everything it learned through three complementary views: an interactive knowledge graph, a 3D overview of the entire world, and a full-text Elasticsearch panel. Each view targets a different kind of exploration — from tracing call chains and copy-book lineage through to open-ended Japanese keyword search. All graph and search screens require the admin role when authentication is enabled.

Knowledge graph viewer

Open ナレッジグラフ (Knowledge Graph) at /ui/graph.html to see the live graph for a registered world. Nodes are colour-coded by type (see the node-type table below). Edges carry a confidence indicator that reflects how the relationship was extracted.
  • Click a node to expand its immediate neighbours. The panel on the right shows the node’s properties, its source document links, and a button to launch an impact analysis run from that node.
  • Name search — type a name in the search box to jump directly to a matching node. Partial matches are supported.
  • Filters — toggle node types, edge types, deprecated status, and confidence threshold from the toolbar.
Clicking a node and selecting 影響調査 (Impact Analysis) sends that node directly to the chat agent as the starting point for a full impact traversal. This is the fastest path from “I found the node” to “what does changing it affect?”

Node types

The graph uses a closed vocabulary of node labels — Sherpa will not create nodes outside this list.
Node labelDescriptionExamplePrimary extraction source
ModuleA program, class, or COBOL PROGRAM-IDBILLGEN, TaxCalcStatic (COBOL / JCL)
CopybookA COBOL copybook (shared data definitions)TAXRATE-CPYStatic (COPY statement)
DataItemA column, copybook field, or dataset itemTAX-RATE, CUST-IDStatic (copybook / SQL)
FunctionA business functionInvoice issuanceLLM (design documents)
ScreenA UI screen or formInvoice entry screenLLM + static (web)
ReportA printed output or batch reportInvoice, delivery noteLLM + static (OUTPUT)
BatchA job or job-netDaily close jobStatic (JCL)
TableA database table, VSAM file, or datasetINVOICE_HDRStatic (EXEC SQL / FILE)
BusinessRuleA calculation or decision ruleConsumption-tax calculationLLM (design documents)
ParameterA code value, constant, or thresholdConsumption-tax rate = 10%LLM + static (constants)
DocumentA design document — 1:1 with the ledgerSpecification sheetSet at ingest time
StandardA regulation or coding standardConsumption Tax ActLLM
IncidentA recorded fault or incidentTicket #1234LLM

Edge types

EdgeDirection (dependency)ExampleUsed in impact traversal
COPIESModule → CopybookBILLGEN copies TAXRATE-CPY
INVOKESScreen / Batch / Module → Module / FunctionDaily-close job invokes BILLGEN
CONTAINSCopybook / Table → DataItemTAXRATE-CPY contains TAX-RATE
REALIZESDataItem → Parameter / BusinessRuleTAX-RATE realizes consumption-tax rate
IMPLEMENTED_BYFunction / BusinessRule → ModuleInvoice-issuance function implemented by BILLGEN
PRODUCED_BYReport → Function / Module / BatchInvoice produced by invoice-issuance function
DOCUMENTSDocument → any artefactSpec sheet documents invoice-issuance function— (provenance only)
RELATES_TOIncident → any artefactIncident #1234 relates to BILLGEN— (reference only)
USESFunction / Module → BusinessRule / ParameterInvoice function uses tax rate
ACCESSESFunction / Module → Table / DataItemBILLGEN accesses INVOICE_HDR (rw=write)
CORRESPONDS_TOSame-name node in different generationsTAXCALC in v1 ↔ TAXCALC in v2— (cross-scope only)
CONFORMS_TOFunction / Module → StandardBILLGEN conforms to Consumption Tax Act✓ (regulation scope)

Confidence markers

Every node and edge carries a confidence indicator that reflects how it was extracted:
MarkerMeaningExtraction method
● ConfirmedDeterministic — reproduced identically on every ingest runStatic analysis (COBOL / JCL parser)
○ Requires checkProbabilistic — derived by the LLM from document textLLM semantic extraction
Nodes with status = "deprecated" or status = "hidden_candidate" are excluded from RAG retrieval by default but remain visible in the graph viewer with a reduced confidence display. Use the 廃止を含む (Include deprecated) filter to show or hide them. You can force their inclusion in impact queries by passing include_deprecated=true to the graph search API.

3D knowledge overview

The ナレッジ概観 (Knowledge Overview) screen renders the entire world as a 3D force-directed graph. It is designed for a top-down “orient first, then drill down” workflow:
  • Real relationship lines connect every node — the layout reflects actual structural density, not a layout algorithm.
  • Hover over a node to highlight its immediate neighbours.
  • Filters for type, confidence, and deprecated status are available in the toolbar.
  • Click any node to jump to the standard graph viewer and continue to impact analysis from there.
GET /graph/search filters the graph by relationship type and attribute conditions, returning a nodes-and-edges payload in the same format as the graph viewer.
GET /graph/search
  ?version=my-world
  &relationship=COPIES
  &field=name
  &value=TAXRATE
  &op=contains
  &include_deprecated=false
  &limit=200
ParameterDescription
versionWorld ID to query
relationshipOne or more edge types to filter (repeat the parameter for multiple values)
fieldNode property name to filter on
valueValue to match
opComparison operator: eq, contains, starts_with
include_deprecatedInclude deprecated / hidden nodes and edges (default false)
scope_pathsFolder prefix(es) to restrict the search scope
limitMaximum number of result nodes (1–1000, default 200)
To retrieve the full closed vocabulary of available labels and relationship types, call GET /graph/facets — this returns the exact string values accepted by the relationship and field parameters.

Graph ask (natural-language question)

POST /graph/ask lets you ask a free-text question against the graph. The AI traverses the graph neighbourhood, returns matching nodes with their relationship paths, and explains what it found. If no supporting evidence exists in the graph the response states this explicitly rather than hallucinating an answer.
POST /graph/ask
Content-Type: application/json

{
  "question": "Which programs are affected if the consumption-tax rate changes?",
  "version": "my-world",
  "scope_paths": ["src/billing"]
}
Graph ask requires a configured LLM connection (OpenAI, Gemini, or Ollama). If no LLM is configured the endpoint returns HTTP 503. Enable and select the model in the Settings screen.

Full-text search (Elasticsearch)

GET /admin/es/search runs a BM25 full-text query across the world’s Elasticsearch index using kuromoji morphological analysis for Japanese. Results are ranked by relevance score and include the document ID, an excerpt, and the score.
GET /admin/es/search
  ?version=my-world
  &query=消費税計算
  &scope_paths=src/billing
  &k=20
ParameterDescription
versionWorld ID to query (same as version on other endpoints)
querySearch string — kuromoji tokenisation, BM25 ranking
scope_pathsRestrict results to a sub-folder prefix
kNumber of results to return
Results show the document name (relative path from the world root) and a text excerpt. Physical file paths are never exposed.
Vector/semantic search (embedding-based) is available as an optional enhancement. When an embedding backend is enabled, results also incorporate semantic similarity, which improves recall for paraphrased queries. Without an embedding backend, only BM25 keyword matching is used.

Concept management

Sherpa automatically proposes bridges between business-layer concepts (e.g. Parameter: consumption-tax rate) and their code-level counterparts (e.g. DataItem: TAX-RATE) via the REALIZES edge. Admins can review, confirm, and disable these proposals.
EndpointAction
POST /worlds/{wid}/concepts/proposeAsk the AI to generate concept-to-code bridge proposals for the world
POST /worlds/{wid}/concepts/confirmAccept a set of proposals — writes them to concepts.json and rebuilds the graph with the new bridges active
POST /worlds/{wid}/concepts/disableAdd a concept–item pair to the denylist — the bridge is removed from the graph and will not be recreated on re-ingest
Disabling a concept bridge is permanent with respect to that world’s concepts.json; a full re-ingest will not restore a disabled bridge.

Build docs developers (and LLMs) love