Find answers from the community

s
F
Y
a
P
Updated 2 years ago

Right so I m doing this and finding the

Right - so I'm doing this and finding the ListIndex is much faster with required_keyword (makes sense).

Plain Text
keywords = extract_keywords_given_response(
                input, start_token="")

query_result = index.query(
                input, verbose=True, llm_predictor=llm_predictor, required_keywords=keywords)


For large indexes I was finding it too slow to be usable. Wondering if extracting keywords should be a default (or at least suggested)
y
j
b
7 comments
Maybe try out the vector index if searching an entire document isn't required for your use-case
List index is O(n)
Tree index also an option, but index construction is expensive in terms of LLM summarization calls
@bbornsztein we have a GPTSimpleKeywordTableIndex which is a keyword extractor index. The list index is meant to be very basic (and by default iterates over all nodes unless you specify certain params like a keyword filter)
ahh.. I see - but that one makes LLM calls at index time, right?
SimpleKeywordTableIndex just uses a regex word parser
GPTKeywordTableIndex (without the simple) uses LLM's
Add a reply
Sign up and join the conversation on Discord