Find answers from the community

Home
Members
EnderEnder
E
EnderEnder
Offline, last seen 3 months ago
Joined September 25, 2024
I have a potential use case where I am augmenting ChatGPT with strategies. Just a long list of strategies with a title, associated keywords, description & steps to implement. Right now this is in a simple vector file but likely needs to be some kind of JSON setup.

Question: How do I accomplish retrieving 3 of these strategies to be presented to the user in a single prompt? Right now no matter my prompt, it only returns 1 strategy. Is there some kind of recursive function I need to look at?
2 comments
L
Going to jump on the issue bandwagon. Trying to launch the Streamlit demo on Streamlit cloud but running into a dictionary issue:

File "/home/appuser/venv/lib/python3.10/site-packages/llama_index/docstore/registry.py", line 36, in load_docstore_from_dict

type = docstore_dict[TYPE_KEY]

KeyError: 'type'
9 comments
E
L
E
EnderEnder
·

Thoughts

Based on your seemingly endless wealth of knowledge, can you let me know your thoughts on this:

  1. Relatively large store of PDF/TXT documents (for this example 200)
  2. Need to retain detail as much as possible in the answer.
  3. 50/50 split on if answers will be based on an individual document or need to be synthesized across multiple documents.
With the above considered, what is the best approach (in your opinion) available today to achieve this? I am currently using a graph to collate multiple simple vector indexes and then querying that. Still very early into my exploration of this framework so keen to get your thoughts.
4 comments
E
L
Okay so I'm only 2 weeks into coding for python and applying knowledge from other languages so I just need to make sure I am on the right path. I have a folder with a collection of indexes. These are the used for build a graph, etc. Currently the graph builds as expected and outputs a json file but querying it fails. So I am working backwards from there.

Is this a valid way to load in multiple indexes at once? The array passed into it is a collection of document names.

def load_all_indexes(index_files):
indexes = []
print(index_files)
for index_file in index_files:
index = GPTSimpleVectorIndex.load_from_disk(index_file, service_context=service_context)
indexes.append(index)
return indexes
13 comments
L
E
@kapa.ai How do I limit the responses so they are shorter?
16 comments
E
L
a
k
How does one save a graph? Looks like

graph.storage_context.persist(persist_dir="./tree/")

Does not work?

'ComposableGraph' object has no attribute 'storage_context'
14 comments
s
L
j
E
Just updated llama-index and now suddenly can't load my graph from disk. Is there something I need to change?

AttributeError: type object 'ComposableGraph' has no attribute 'load_from_disk'
2 comments
E
L