Slide 85
Slide 85 text
85
85
It’s Not Difficult to Build with Llama Index
sitemap_url = "[SITEMAP URL]"
sitemap = adv.sitemap_to_df(sitemap_url)
urls_to_crawl = sitemap['loc'].tolist()
...
# 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("YOUR PROMPT HERE")