Build a Smart GitHub API Chatbot with RAG, OpenAI, and Pinecone
detail.loadingPreview
Empower your team with an intelligent chatbot that answers questions about the GitHub API using Retrieval Augmented Generation (RAG). This n8n workflow leverages OpenAI for embeddings and large language models (LLM), and Pinecone as a vector database, to provide accurate and context-aware responses.
About This Workflow
This n8n workflow demonstrates a powerful RAG implementation, creating a sophisticated chatbot for the GitHub OpenAPI Specification. It operates in two main phases: first, it automatically fetches the latest GitHub API specifications, splits them into manageable chunks, generates embeddings using OpenAI, and stores them efficiently in Pinecone. The second phase provides a real-time chat interface where user queries are embedded by OpenAI, used to retrieve relevant context from Pinecone, and then passed to an OpenAI GPT-4o-mini language model along with chat history for highly accurate and contextualized answers about the GitHub API. It's an ideal solution for automating access to complex documentation.
Key Features
- Automated API Specification Ingestion: Automatically fetches and indexes the GitHub OpenAPI Specification.
- Intelligent RAG Architecture: Combines OpenAI's advanced LLM capabilities with Pinecone's vector search for precise, context-aware responses.
- OpenAI Powered Embeddings & LLM: Utilizes OpenAI for both generating document embeddings and powering the conversational AI with GPT-4o-mini.
- Scalable Vector Database: Stores and retrieves vast amounts of documentation efficiently using Pinecone.
- Interactive Chat Interface: Provides a responsive chatbot experience for quick access to API information.
How To Use
- Set up Credentials: Ensure you have valid API keys for OpenAI and Pinecone, and configure them as credentials within n8n.
- Create Pinecone Index: Create a Pinecone index named
n8n-demoin your Pinecone account. If you wish to use a different name, update the 'Pinecone Vector Store' nodes accordingly. - Index GitHub API Data: Execute the top branch of the workflow (starting with 'When clicking ‘Test workflow’') to fetch, embed, and store the GitHub OpenAPI Specification in Pinecone.
- Initiate Chat: Once indexing is complete, use the 'When chat message received' trigger to interact with your new GitHub API chatbot.
- Customize AI Agent: Optionally, modify the 'AI Agent' node's system message to fine-tune its persona or focus for specific use cases.
Apps Used
Workflow JSON
{
"id": "a86b5bc4-cdea-4750-8f6d-3437307acf97",
"name": "Build a Smart GitHub API Chatbot with RAG, OpenAI, and Pinecone",
"nodes": 7,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: a86b5bc4-cdea...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Build a Custom OpenAI-Compatible LLM Proxy with n8n
This workflow transforms n8n into a powerful OpenAI-compatible API proxy, allowing you to centralize and customize how your applications interact with various Large Language Models. It enables a unified interface for diverse AI capabilities, including multimodal input handling and dynamic model routing.
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Visualize Your n8n Workflows: Interactive Dashboard with Mermaid.js
Gain unparalleled visibility into your n8n automation landscape. This workflow transforms your n8n instance into a dynamic, interactive dashboard, leveraging Mermaid.js to visualize all your workflows in one accessible place.