fix(pipeline): retry on 0-entity response, save raw debug, improve template
- SourcePipeline: retry split_entities stage once when 0 entity delimiters are found (free-tier models intermittently return short non-formatted responses); save raw LLM response to <stage>-raw.md alongside prompts - Return None (pause pipeline) rather than writing empty view file when no entities found after max retries - _http.py: wrap json.JSONDecodeError in LLMAPIError with body preview - extract-entities.md: add explicit H2-heading format example to Output Format section to prevent models from using inline "Section:" format Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,3 +52,35 @@ already contains it. Only extract entities that are genuinely new.
|
||||
|
||||
Output each entity as a separate markdown document, delimited by
|
||||
`--- ENTITY: <entity-name> ---` markers.
|
||||
|
||||
Use **H2 headings** (`##`) for each section inside the entity document.
|
||||
Do NOT use inline `Section:` format or H3 headings.
|
||||
|
||||
Example of a correctly formatted entity:
|
||||
|
||||
```
|
||||
--- ENTITY: division of labour ---
|
||||
|
||||
# Division of Labour
|
||||
|
||||
## Definition
|
||||
|
||||
The separation of a work process into distinct tasks performed by specialised
|
||||
workers, increasing productivity through greater dexterity, saved time, and
|
||||
the invention of labour-saving machinery.
|
||||
|
||||
## Source Chapter
|
||||
|
||||
Book I, Chapter 1
|
||||
|
||||
## Context
|
||||
|
||||
The opening chapter's central argument, illustrated by Smith's pin factory
|
||||
example showing how dividing 18 operations dramatically increases output.
|
||||
|
||||
## Economic Domain
|
||||
|
||||
Production
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user