Files
spring-ai/graphrag-neo4j/output/01-extraction.txt
T

77 lines
2.6 KiB
Plaintext

# Entity and relation extraction through ChatClient.entity() (STUB model, not an LLM)
--- the user message the model receives for svc-checkout.txt ---
Extract the entities and relations from the document.
DOCUMENT_START
Checkout Service. The Checkout Service takes a customer's cart and turns it into an order. It depends on the Payments Gateway to take card payments and on the Inventory Service to reserve stock. The Checkout Service is owned by the Storefront Team. Its latency dashboard lives in the shared Grafana folder.
DOCUMENT_END
Your response should be in JSON format.
Do not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation.
Do not include markdown code blocks in your response.
Remove the ```json markdown from the output.
Here is the JSON Schema instance your output must adhere to:
```{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"entities" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"name" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "SYSTEM", "TEAM", "PERSON", "VENDOR", "INCIDENT", "PLACE" ]
}
},
"required" : [ "name", "type" ],
"additionalProperties" : false
}
},
"relations" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"source" : {
"type" : "string"
},
"target" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : [ "DEPENDS_ON", "OWNED_BY", "LED_BY", "HOSTED_ON", "AFFECTED", "CAUSED_BY", "REPORTS_TO", "LOCATED_IN" ]
}
},
"required" : [ "source", "target", "type" ],
"additionalProperties" : false
}
}
},
"required" : [ "entities", "relations" ],
"additionalProperties" : false
}```
--- the parsed Extraction record ---
entity SYSTEM Checkout Service
entity SYSTEM Payments Gateway
entity SYSTEM Inventory Service
entity TEAM Storefront Team
relation Checkout Service -[DEPENDS_ON]-> Payments Gateway
relation Checkout Service -[DEPENDS_ON]-> Inventory Service
relation Checkout Service -[OWNED_BY]-> Storefront Team
--- all 35 chunks ---
model calls : 35 (one per chunk)
characters sent : 72437 (about 18109 tokens at 4 characters per token, an estimate)
entity mentions (before merging): 54
relations : 33
chunks with no relation at all : 14