Find answers from the community

Updated 3 weeks ago

Structure

I was trying to modify the demo notebook below for 'Dynamic Section Retrieval with LlamaParse' (originally based on OpenAI's gpt-4o) so that it could work with an LLM on Groq and an open embedding model on Hugging Face:
https://github.com/run-llama/llama_parse/blob/main/examples/advanced_rag/dynamic_section_retrieval.ipynb

My modified notebook and data files are in this repo: https://github.com/tlyim/DynSecRetrieval

On Google Colab (Python 3, T4 GPU), I could execute the modified notebook with expected results up to and before the chunk with this code line: sections_dict = asyncio_run(acreate_sections(text_nodes_dict))

When I ran this line repeatedly without changing anything, each time it could give me a different error message. In a random fashion, the error message could be one of the three types below.

Type 1: https://github.com/tlyim/DynSecRetrieval/blob/main/errorTypes/error1.JPG
Type 2: https://github.com/tlyim/DynSecRetrieval/blob/main/errorTypes/error2.JPG
Type 3: https://github.com/tlyim/DynSecRetrieval/blob/main/errorTypes/error3.JPG

Oddly, when I executed the notebook on Github Codespaces (with 2-core, 8GB RAM) using LlamaParse without Premium Mode (i.e., with the option premium_mode=True commented out in a chunk), I would get only an error message of Type 1 above. However, when this was done with the Premium Mode, I would again get random error messages but only of Type 1 and 2 above.

I'd appreciate very much any help/suggestion on understanding why the error message was not consistently the same and how it could be fixed. Thanks.
L
T
2 comments
This particular step is relying on function calling
Open source llms like the ones groq uses are probably not entirely reliable for this compared to openai, anthropic. Etc.

In the acreate_sections code, you'll probably need to catch and retry when errors happen (maybe injecting the error into the prompt when you retry)
I c. Thanks for the information.
Add a reply
Sign up and join the conversation on Discord