Find answers from the community

Updated 2 months ago

Any chance anyone has used the

Any chance anyone has used the KeywordTableIndex successfully?

I am currently using it but getting an empty index returned every time.
Using the callback manager I can see that the payload to gpt 3.5 is successfully getting there and coming back with X keywords, but for some reason the index is always empty at the end...

Plain Text
# Templating step is successful (2 events per step)
CBEvent(event_type=<CBEventType.TEMPLATING: 'templating'>, payload={<EventPayload.TEMPLATE: 'template'>: "Some text is provided below. Given the text, extract up to {m......

CBEvent(event_type=<CBEventType.TEMPLATING: 'templating'>, payload=None, time='01/09/2024, 11:25:30.....

# LLM step is successful (Also 2 events per step)
CBEvent(event_type=<CBEventType.LLM: 'llm'>, payload={<EventPayload.MESSAGES: 'messages'>: [ChatMessage(role=<MessageRole.USER: 'user'>, content="Some text is provided below. Given the text, extract up to 3 keywords from

CBEvent(event_type=<CBEventType.LLM: 'llm'>, payload={<EventPayload.MESSAGES: 'messages'>: [ChatMessage(role=<MessageRole.USER: 'user'>, content="Some text is
...
EventPayload.RESPONSE: 'response'>: ChatResponse(message=ChatMessage(role=<MessageRole.ASSISTANT: 'assistant'>, content='KEYWORDS: Ticket ID: 7690, Project....


Any ideas?
Using Service context with an AzureOpenAI deployment
Index is instantiated like this
Plain Text
index = KeywordTableIndex(nodes, max_keywords_per_chunk=3, use_async=False, service_context=service_context, show_progress=True)


index.summary returns 'None'
L
L
5 comments
index.summary is not used for this

This works for me
Attachment
image.png
Okay looks like I just missed that. The reason I was thinking the index was empty though is that I always get an empty response.


Just figured out though that my query was too dissimilar from the keywords so it wasn't returning anything I guess.

thanks for your help!
Really apprecaite all the work you put in
Yea keyword retrieval can be tricky! I usually would combine it with other methods to avoid having zero nodes returned
Speaking of, do you have any examples on hand for combining?
Looking at query fusion retriever and want to make sure I am doing it correclty
thats actually exactly what I would use πŸ‘ I think this notebook does an ok-ish job at showing how it works
https://docs.llamaindex.ai/en/stable/examples/retrievers/simple_fusion.html#fuse-the-indexes
Add a reply
Sign up and join the conversation on Discord