Creates and bootstraps Knowledge Graph projects from video transcripts. Extracts entities (people, organizations, concepts) and relationships into searchable graphs...
Use list_kg_projects first:
Ask for a project name describing the research domain:
"What would you like to call this Knowledge Graph project?" Examples: 'Tech Industry Interviews', 'Climate Research', 'Company History'
Use create_kg_project and report the project ID.
This is where the magic happens:
Explain: "I'll analyze your transcript to discover entity types (people, organizations, concepts) and relationships."
Use bootstrap_kg_project with:
project_id: The newly created IDtranscript: Full transcript text (use get_transcript if needed)title: Video/source titleFormat results conversationally:
## Knowledge Graph Schema Discovered!
**Project:** [Name]
**Confidence:** [X]%
### Entity Types Discovered ([N])
- **Person**: Individuals mentioned
- **Company**: Organizations, startups
- [etc.]
### Relationship Types ([N])
- **works_at**: Employment relationships
- **founded**: Company founding
- [etc.]
### Example Entities Identified ([N])
- [Entity Name] ([Type])
- [etc.]
Now extracting entities into the graph...
IMMEDIATELY after bootstrap, call extract_to_kg with the SAME transcript:
extract_to_kg(
project_id="...",
transcript="...", ā Same transcript used for bootstrap
title="...", ā Same title
transcript_id="..." ā REQUIRED for evidence linking
)
This populates the actual graph with entities. Bootstrap only creates the schema (types and patterns); extraction adds the nodes and edges.
After extraction completes, present:
## Knowledge Graph Complete!
**Entities Added:** [N]
**Relationships Found:** [N]
Would you like me to:
1. Extract entities from another transcript
2. View current graph statistics
3. Explore key players and connections
For subsequent transcripts on a bootstrapped project:
extract_to_kg directly (no re-bootstrap needed)transcript_id to enable evidence linkingextract_to_kg (CRITICAL)When calling extract_to_kg, always include:
project_id: Target KG project IDtranscript: Full transcript texttitle: Video/source titletranscript_id: Required for evidence ā Use the ID returned by save_transcriptextract_to_kg(
project_id="abc123",
transcript="...",
title="Interview with CEO",
transcript_id="5da6b612" ā from save_transcript result
)
Without transcript_id, the graph inspector won't be able to show supporting evidence for entities.
extract_to_kg afterward to populate the graphtranscript_id when using extract_to_kgā WRONG:
bootstrap_kg_project(transcript)
ā "Your KG is ready! Extract from ANOTHER transcript?"
ā CORRECT:
bootstrap_kg_project(transcript)
ā "Schema discovered! Now extracting entities..."
extract_to_kg(same_transcript)
ā "X entities and Y relationships added!"