he info¶
Display information and statistics about a knowledge abstract.
Synopsis¶
Arguments¶
| Argument | Description |
|---|---|
KA_PATH |
Path to knowledge abstract directory |
Description¶
Shows metadata and statistics for a knowledge abstract:
- Path — Location of the knowledge abstract
- Template — Template used for extraction
- Language — Language code (en/zh)
- Timestamps — Creation and last update times
- Statistics — Node count, edge count
- Index status — Whether search index is built
Examples¶
Basic Usage¶
Output:
Knowledge Abstract Info
Path ./output/
Template general/biography_graph
Language en
Created 2024-01-15 10:30:00
Updated 2024-01-15 10:35:22
Nodes 25
Edges 32
Index Built
After Extraction¶
After Feed¶
Output Fields¶
| Field | Description |
|---|---|
Path |
Absolute path to knowledge abstract |
Template |
Template identifier (e.g., general/biography_graph) |
Language |
Processing language (en or zh) |
Created |
Initial extraction timestamp |
Updated |
Last modification timestamp |
Nodes |
Number of entities/items |
Edges |
Number of relationships |
Index |
Search index status (Built or Not Built) |
Use Cases¶
Verify Extraction¶
Check that extraction worked:
Check Index Status¶
Before using search or chat:
Monitor Growth¶
Track knowledge abstract growth over time:
he info ./ka/
# Feed more documents
he feed ./ka/ update.md
he info ./ka/
# Compare node/edge counts
Scripting¶
Use in automation scripts:
#!/bin/bash
if he info ./ka/ 2>/dev/null; then
echo "Knowledge base exists"
he feed ./ka/ new_doc.md
else
echo "Creating new knowledge abstract"
he parse new_doc.md -t general/biography_graph -o ./ka/ -l en
fi
Troubleshooting¶
"Knowledge base directory not found"¶
The directory doesn't exist or doesn't contain a knowledge abstract:
Missing metadata¶
If metadata is corrupted, template/language show as "unknown":
The knowledge abstract is still usable but some features may be limited.
See Also¶
he parse— Create knowledge abstracthe feed— Add to knowledge abstracthe build-index— Build search index