Version: 0.0.5 (stable)
agrag.ingestion.extract.LLMExtractor
Bases: ABC
LLM role that may receive entities found by an earlier extractor.
Functions:
- extract – Extract entities and relations from one chunk.
Attributes:
- max_concurrency (
int | None) –
extract
extract(chunk:Chunk, schema:GraphSchema, candidates:Sequence[ExtractedEntity] | None = None) -> ExtractionResult
Extract entities and relations from one chunk.
Parameters:
- chunk (
Chunk) – The chunk to read. - schema (
GraphSchema) – The entity and relation types to extract. - candidates (
Sequence[ExtractedEntity] | None) – Entities found by an earlier extractor. Escalation may pass them for review; an implementation may ignore them.
Returns:
ExtractionResult– The entities and relations found in the chunk.
max_concurrency
max_concurrency: int | None = None