he feed¶
Add documents to an existing knowledge abstract incrementally.
Synopsis¶
Arguments¶
| Argument | Description |
|---|---|
KA_PATH |
Path to existing knowledge abstract directory |
INPUT |
Input file path or - for stdin |
Options¶
| Option | Short | Description |
|---|---|---|
--template |
-t |
Override template (uses metadata if omitted) |
--lang |
-l |
Override language (uses metadata if omitted) |
Description¶
The feed command adds new documents to an existing knowledge abstract without losing existing data:
- Loads existing knowledge — Reads current knowledge abstract state
- Extracts from new document — Processes the new content
- Merges intelligently — Combines new and existing data, handling duplicates
- Updates metadata — Records the update timestamp
This is ideal for: - Building knowledge abstracts over time - Adding updates to existing documents - Combining information from multiple sources
Examples¶
Basic Usage¶
# Initial extraction
he parse tesla_bio.md -t general/biography_graph -o ./tesla_kb/ -l en
# Add more content
he feed ./tesla_kb/ tesla_inventions.md
Feed Multiple Documents¶
Or use a loop:
From Stdin¶
Merge Behavior¶
The merge process handles:
| Scenario | Behavior |
|---|---|
| Same entity | Merged, descriptions combined |
| Same relation | Updated with latest information |
| New entities | Added to knowledge abstract |
| New relations | Added connecting existing/new entities |
Workflow Example¶
Building a Research Knowledge Abstract¶
# Day 1: Initial paper
he parse paper_v1.md -t general/concept_graph -o ./research_kb/ -l en
he show ./research_kb/
# Day 7: Updated version
he feed ./research_kb/ paper_v2.md
he show ./research_kb/
# Day 14: Related work
he feed ./research_kb/ related_work.md
he build-index ./research_kb/
he talk ./research_kb/ -q "What are the key concepts across all papers?"
Incremental Biography¶
# Start with early life
he parse early_life.md -t general/biography_graph -o ./bio_kb/ -l en
# Add career period
he feed ./bio_kb/ career.md
# Add later years
he feed ./bio_kb/ later_years.md
# Final visualization
he show ./bio_kb/
Verification¶
Check that the feed worked:
Look for:
- Increased node count
- Increased edge count
- Updated timestamp
Best Practices¶
- Use same template — Feeding should use compatible templates
- Match language — Use consistent language for best results
- Rebuild index after —
he build-index ./ka/for search/chat - Visualize changes —
he show ./ka/to see updates
Error Handling¶
"Not a valid Knowledge Abstract directory"¶
The directory doesn't contain a valid knowledge abstract. Check:
"Template mismatch"¶
Feeding works best with the same template type. Override if needed:
See Also¶
he parse— Create new knowledge abstracthe info— View knowledge abstract statisticshe build-index— Rebuild search index after feeding