Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
![Banner](https://raw.githubusercontent.com/pavanjava/bootstrap-rag/refs/heads/main/assets/bootstrap-rag.png)
# bootstrap-rag
this project will bootstrap and scaffold the projects for specific semantic search and RAG applications along with regular boiler plate code.

### Architecture
![Arch](assets/architecture.png)

### prerequisite
### Installing prerequisite
#### Option-1
- install ollama following this [guide](https://ollama.com/download)
- install qdrant follwing this [guide](https://qdrant.tech/documentation/guides/installation/)
Expand Down Expand Up @@ -36,8 +37,8 @@ Note: Only `llamaindex` and `Qdrant Search` are functional for now, others frame

#### Resources

![Demo GIF](assets/demo.gif)
![Demo GIF](https://raw.githubusercontent.com/pavanjava/bootstrap-rag/refs/heads/main/assets/demo.gif)

![Qdrant](assets/qdrant.png)
![Qdrant](https://raw.githubusercontent.com/pavanjava/bootstrap-rag/refs/heads/main/assets/qdrant.png)

![Arize Phoenix](assets/observability.png)
![Arize Phoenix](https://raw.githubusercontent.com/pavanjava/bootstrap-rag/refs/heads/main/assets/observability.png)
Binary file added assets/bootstrap-rag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion bootstraprag/templates/langchain/readme.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
### under development
## LangChain Templates
This section of the project has stable PoC Ready various RAG codes starting from simple to advanced techniques along with the LangGraph and LangSmith.
Every LangChain code base has its own readme.md for more specific guidance.
Go to a specific project and follow the respective readme.md fore more details.
As a backend layer all the LangChain projects uses Qdrant and for LLM the project templates use Ollama.
These can be just replaced by their substitutes to make the code working normally.
Empty file.
30 changes: 30 additions & 0 deletions bootstraprag/templates/langchain/simple_rag/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from langchain_community.embeddings.fastembed import FastEmbedEmbeddings
from langchain_qdrant import QdrantVectorStore
from langchain_community.document_loaders import WebBaseLoader
from langchain.text_splitter import RecursiveCharacterTextSplitter
from qdrant_client import QdrantClient
from qdrant_client.http.models import Distance, VectorParams

embeddings = FastEmbedEmbeddings()

client = QdrantClient(url='http://localhost:6333', api_key='th3s3cr3tk3y')

client.create_collection(
collection_name="demo_collection_1",
vectors_config=VectorParams(size=384, distance=Distance.COSINE),
)

vector_store = QdrantVectorStore(
client=client,
collection_name="demo_collection_1",
embedding=embeddings
)

WEBSITE_URL = "https://medium.com/@jaintarun7/multimodal-using-gemini-and-llamaindex-f622a190cc32"
data = WebBaseLoader(WEBSITE_URL)
docs = data.load()

text_split = RecursiveCharacterTextSplitter(chunk_size=512,chunk_overlap=50)
chunks = text_split.split_documents(docs)

qdrant = vector_store.from_documents(chunks, embedding=embeddings, api_key='th3s3cr3tk3y')
Empty file.
7 changes: 7 additions & 0 deletions bootstraprag/templates/langchain/simple_rag/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
langchain==0.3.3
langchain-core==0.3.10
langchain-qdrant==0.1.4
langchain-ollama==0.2.0
langchain-community==0.3.2
qdrant-client==1.12.0
fastembed==0.3.6
6 changes: 6 additions & 0 deletions bootstraprag/templates/llamaindex/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## LlamaIndex Templates
This section of the project has stable PoC Ready various RAG codes starting from simple to advanced techniques along with the LlamaDeploy and llamaAgents.
Every LlamaIndex code base has its own readme.md for more specific guidance.
Go to a specific project and follow the respective readme.md fore more details.
As a backend layer all the LlamaIndex projects uses Qdrant and for LLM the project templates use Ollama.
These can be just replaced by their substitutes to make the code working normally.
48 changes: 0 additions & 48 deletions bootstraprag/templates/llamaindex/simple_rag/test_set_generator.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

class MeasureRetrievalQuality:
def __init__(self, dataset_path: str, collection_name: str, streaming: bool = True):
_ = load_dotenv(find_dotenv())
# path = "Qdrant/arxiv-titles-instructorxl-embeddings"
dataset = load_dataset(
path=dataset_path, split="train", streaming=True,
Expand Down