Coverage for src/lilbee/wiki/entity_extractor/llm_tagged.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-08-14 11:46 +0000

1"""Fully LLM-driven entity extractor. 

2 

3Stub: the real implementation asks the LLM to propose a schema AND tag 

4every chunk. Most accurate, most expensive (O(N) LLM calls per ingest). 

5""" 

6 

7from __future__ import annotations 

8 

9from typing import TYPE_CHECKING 

10 

11from lilbee.wiki.entity_extractor.base import ExtractedEntity 

12 

13if TYPE_CHECKING: 

14 from lilbee.core.config import Config 

15 from lilbee.data.store import SearchChunk 

16 from lilbee.providers.base import LLMProvider 

17 

18 

19class LlmTaggedExtractor: 

20 """LLM-proposed schema plus per-chunk LLM tagging.""" 

21 

22 def __init__(self, provider: LLMProvider, config: Config) -> None: 

23 self._provider = provider 

24 self._config = config 

25 

26 def available(self) -> bool: 

27 return True 

28 

29 def extract(self, chunks: list[SearchChunk]) -> list[ExtractedEntity]: 

30 raise NotImplementedError("LlmTaggedExtractor.extract is not yet implemented")