Rajan Sharma
Create rag.py
3c323be verified
raw
history blame
200 Bytes
class RAGIndex:
def __init__(self):
self.docs=[]
def add(self,chunks):
self.docs.extend(chunks)
def retrieve(self,q,k=5):
return [(d,1.0) for d in self.docs[:k]]