1. Learn
  2. /
  3. Courses
  4. /
  5. Graph RAG with LangChain and Neo4j

Connected

Exercise

Text-to-Cypher retrieval chain

You now have a chain capable of converting natural language into a Cypher statement. Let's use it in a larger chain to execute this LLM-generated Cypher and answer user questions with the retrieved information.

Instructions

100 XP
  • Update the code to execute the Cypher statement generated by the text_to_cypher_chain and assign it to the "context" variable used in QA_PROMPT.
  • Pass through the input to the "question" variable unchanged.