workflows.fit
Back to n8n workflows
n8n templateFreeBy InfraNodus

Create custom reasoning patterns for AI agents with GraphRAG & knowledge ontology

Teach your AI agent HOW to think, not WHAT to think [![Video tutorial](https://img.youtube.com/vi/jhqBb3nuyAY/sddefault.jpg)](https://www.youtube.com/watch?v=jhqBb3nuyAY) This workflow demonstrates how you can build a...

AILangchainCore NodesChat TriggerLm Chat Open AiMemory Buffer WindowHttp Request Tool
Loading interactive preview...

Template notes

Teach your AI agent HOW to think, not WHAT to think

[![Video tutorial](https://img.youtube.com/vi/jhqBb3nuyAY/sddefault.jpg)](https://www.youtube.com/watch?v=jhqBb3nuyAY)

This workflow demonstrates how you can build an AI agent in n8n that uses the reasoning logic you define. So an LLM learns a way of thinking, which you can then apply to multiple problems:

- Make an AI chatbot that knows how to convince anybody using the "Getting to Yes" method - Build an LLM workflow that uses Ray Dalio's principles to spot investment opportunities - Create an AI agent crew of interdisciplinary thinkers: e.g. a specialist in psychology who gives an advice on education programmes.

![InfraNodus knowledge graph](https://infranodus.com/images/front/blog/reasoning-knowledge-graph-infranodus.png)

How it works This template uses the n8n AI agent node as an orchestrating agent that has access to a certain reasoning logic defined by an [InfraNodus knowledge graph](https://infranodus.com).

This graph contains a list of reasoning rules (ontology), which is extracted to provide an advice that is relevant to the original prompt. It uses GraphRAG under the hood to traverse the parts of the graph relevant to the query.

This advice and the reasoning logic extracted is then used by the AI agent to generate a response that is relevant to the user's query but that uses the reasoning logic provided through the graph.