Disclaimer: this workflow template uses the n8n-nodes-couchbase
community package. Community nodes are unverified and usage of them comes with some risks. See here for instructions on installing n8n community nodes.
This template is intended for use by those interested in learning more about Agentic AI workflow development, as well as those interested in learning how to use the Couchbase Search Vector Store node for practical applications.
This workflow helps users decide on travel destinations based on descriptions of several points of interest loaded into Couchbase and retrieved using Vector Search.
How it Works
This template contains two workflows:
- The Data Ingestion workflow uses the following nodes
- Webhook node (to listen for HTTP requests)
- OpenAI Embeddings node (to generate embeddings on document insertion)
- Note: You’ll need to configure OpenAI credentials for this node
- Couchbase Vector node (configured for document insertion)
- Default Data Loader and Recursive Character Text Splitter
- The Chat Application workflow uses the following nodes
- Chat Trigger node
- AI Tools Agent node connect to:
- Gemini (as the Chat Model, for generating responses)
- Simple Memory (as the Memory, to maintain conversation context)
- Couchbase Search Vector node (as the Tool, for search)
- OpenAI Embeddings node (as the Embedding model for the Couchbase Search Vector node, to convert queries to vectors)
Set up
Setting up this workflow is easy and only takes around 10 minutes.
Prerequisites
- A Couchbase Cluster running the Search Service, and corresponding database access credentials
- Be sure the Couchbase cluster allows the incoming IP address for n8n
- Create a Vector Search Index using this index definition
- Create a bucket (called
travel-agent
), scope (called vectors
), and collection (called points-of-interest
) in your Cluster
- OpenAI API Key
- Gemini API Key
Steps
- Configure all necessary credentials (Couchbase, OpenAI, and Gemini)
- Select your bucket, scope, and collection for each of the Couchbase vector nodes
- Ingest data, either using the cURL statements found on the sticky note within the workflow, or using this shell script to ingest 6 points of interest
- Open the chat and test out your travel agent!
Customization and Next Steps
- This workflow template can be made more robust by enhancing the data model to include more information about each point of interest. For example, the addition of price ranges, ideal seasons to visit, activity types, and accomodation options can help inform the LLM further about each destination, and in turn allow it to provide a more tailored response and be more helpful for travel planning.
- Alternatively, the data model could be entirely re-configured to suit a wide variety of other use cases. This template can serve as a building block for all sorts of AI Agent applications using RAG and is not limited to only travel recommendations.