Inspiration
I am a software developer, and switching between stacks is a very common scenario. But revisiting a stack or tool you’ve worked on before can often be frustrating—especially when the answer to your question is just at the back of your mind. To find that answer, you have to sift through the entire documentation, which becomes even more challenging with libraries that frequently update.
A Retrieval-Augmented Generation (RAG) pipeline can help eliminate that frustration by surfacing the most relevant information directly when you need it.
So, do I need to build a RAG from scratch every time I switch back to an old tool? That’s where this project comes in—to make the process seamless and reusable.
What it does
This project, NextAssist, is a RAG pipeline designed to integrate with Markdown-based documentation hosted on GitHub.
Currently, it works with Next.js documentation, allowing developers to search for specific topics and retrieve accurate, context-aware answers from multiple sources, such as:
- Official documentation
- GitHub Issues
- Discussion forums
The pipeline is extensible, meaning it can be adapted with minimal effort to support other libraries and frameworks like Docusaurus (which is used by many famous frameworks for their documentation). This makes it a versatile tool for developers working across different stacks.
How we built it
Document Ingestion:
- Markdown-based documentation from Next.js GitHub repositories is ingested into the pipeline.
- Preprocessing ensures data is formatted and indexed for efficient retrieval.
- Markdown-based documentation from Next.js GitHub repositories is ingested into the pipeline.
Search Engine Integration:
- Cortex Search handles multi-source retrieval by indexing the ingested documents and optimizing query results.
- Cortex Search handles multi-source retrieval by indexing the ingested documents and optimizing query results.
LLM Integration:
- Mistral LLM refines the retrieved results by generating accurate, context-aware answers tailored to the query.
- Mistral LLM refines the retrieved results by generating accurate, context-aware answers tailored to the query.
Extensibility:
- The pipeline is designed to allow easy integration with other frameworks like Docusaurus or MkDocs by adjusting configuration settings.
- The pipeline is designed to allow easy integration with other frameworks like Docusaurus or MkDocs by adjusting configuration settings.
Challenges we ran into
- Metrics for Evaluation:
- Choosing the right metrics for evaluation can be very tricky. For RAG, I understand that the most basics thing is to go for rag triad but there were cases where directly using metrics like context relevance, answer relevance directly didn't make sense and were expected to give a low score, reducing the overall performance.
- Balancing Latency and Accuracy:
- Optimizing retrieval time without compromising on the accuracy and relevancy of results was tricky.
- Optimizing retrieval time without compromising on the accuracy and relevancy of results was tricky.
- Multi-Source Retrieval:
- Combining information from different sources, such as documentation and GitHub Issues, required thoughtful handling to ensure consistency and usefulness.
- Combining information from different sources, such as documentation and GitHub Issues, required thoughtful handling to ensure consistency and usefulness.
Accomplishments that we're proud of
- Successfully integrating Cortex Search and Mistral LLM to build an efficient, scalable RAG pipeline.
- Developing a modular architecture that makes the pipeline easily adaptable to other frameworks and libraries.
- Achieving accurate, context-aware search results tailored for Next.js documentation.
What we learned
- Explored Data engineering and building ETL pipelines.
- Strategies for building extensible and modular pipelines that can adapt to different use cases with minimal effort.
- And a lot more about Snowflake and it's features.
What's next for NextAssist
Support for More Frameworks:
- Extend the pipeline to work seamlessly with Docusaurus, and other popular documentation generators.
- Extend the pipeline to work seamlessly with Docusaurus, and other popular documentation generators.
Improved Multi-Tenancy:
- Enhance the pipeline to support multi-tenancy, making it suitable for you to managing and using multiple documentations at same time or even together.
Performance Optimization:
- Further optimize retrieval latency and indexing speed to handle larger datasets efficiently.
- Further optimize retrieval latency and indexing speed to handle larger datasets efficiently.
Built With
- snowflake
- streamlit
Log in or sign up for Devpost to join the conversation.