Back to prompt library
Build Summary & Knowledge Graph Query Engine
Linked challenge: Document AI: Summarize & Extract from Enterprise Content
Prompt source
implementation1 lines1 sectionsNo variables0 checklist items
Develop the LlamaIndex query engines for both document summarization and knowledge graph-enhanced querying. For summarization, consider using LlamaIndex's `ResponseSynthesizer` with a `tree_summarize` mode or a custom prompt for Gemini 2.5 Pro to generate a podcast-style script and key highlights. For knowledge graph queries, implement a `KnowledgeGraphQueryEngine` that can answer questions requiring relational understanding by leveraging your MongoDB Atlas Vector Search integration. Provide Python code for setting up these query engines and sample usage.