Find answers from the community

Updated 10 months ago

Are there any dummy/monkey objects I can

Are there any dummy/monkey objects I can use for testing? For example, a dummy vector store for which I can test retrievers on?
L
n
15 comments
Are you trying to test accuracy of retrievers? Or just the general operation?
Like, these are unit tests on their functionality. I'm not evaluating them
Or thats what I intend to use them for.
I would just make an index on the fly, using a mock embedding model and mock llm

Plain Text
from llama_index import ServiceContext, VectorStoreIndex, Document

service_context = ServiceContext.from_defaults(llm=None, embed_model=None)

index = VectorStoreIndex.from_documents([Document.example()], service_context=service_context)

retriever = index.as_retriever()

nodes = retriever.retrieve("query")
(replacing as_retriever() with the retriever you are testing)
Ah that works. Thank you!!!
Wait, does this Document.example() function actually generate dummy/sample docs?
it generates a static document πŸ™‚
Very handy actually haha
That works too
Do you have a good sample query for it?
"What are LLMs good at?"
This is helpful - thank you.
Add a reply
Sign up and join the conversation on Discord