Find answers from the community

T
TK
Offline, last seen 3 months ago
Joined September 25, 2024
so after loading in my external data, i found several queries tended to hallucinate a lot. The answers looked impressive, but were largely wrong. Any tips on how to define certain data as “facts” that should use a more deterministic approach (lookup rather than interpret), vs other parts that are more general language /probabilistic lookup? Is it about using different index types somehow?
1 comment
L
has anyone seen this error after running
index = GPTSimpleVectorIndex.from_documents()
and then calling
index.save_to_disk()

TypeError: The view function for 'post_reindex' did not return a valid response. The function either returned None or ended without a return statement.


after this there seems to be a index file saved, if I load it and try to query then i get this error
TypeError: string indices must be integers
9 comments
T
L
T
TK
·

Json QA

I'm having some trouble trying to connect llama index to a simple json dataset. To test out, I've just taken a dump of various orders from my database into a flat json file with each order being a single flat json object (no nested elements, no arrays, etc.). I've loaded it in using
loader = JSONReader()
documents = loader.load_data(Path('./orders.json'))
index = GPTSimpleVectorIndex.from_documents(documents)

but even simple queries to this index seem to get confused like "Get details of order number 12345", it fetches seemingly random details. Am I using the wrong index type for this?
11 comments
L
T