Slide 122
Slide 122 text
12
2
12
2
It’s pretty simple
# Make an index from your documents
index = VectorStoreIndex.from_documents(documents)
# Setup your index for citations
query_engine = CitationQueryEngine.from_args(
index,
# indicate how many document chunks it should return
similarity_top_k=5,
# here we can control how granular citation sources are, the default is 512
citation_chunk_size=155,
)
response = query_engine.query("Answer the following query in 150 words: " + query)