Find answers from the community

A
Arthur
Offline, last seen yesterday
Joined September 25, 2024
A
Arthur
·

Agents

Can someone explain/enumerate some types of LLM agents? Do we have categories of agents? Like the ones that runs until a condition etc??
2 comments
A
W
A
Arthur
·

Integration

For you, llamaindex developers, what was the worst provider to integrate with? And why it was Google?
16 comments
A
L
t
I want to create an endpoint for just inserting documents in a Vector Store. Can I use both add, from MilvusVectorStore, and insert from Index classes? Both does the same thing?
3 comments
A
Is JSON mode removed from llamaparse?
11 comments
A
W
L
Bug Description

I'm encountering an issue while trying to access the "achat" interface to chat with the Gemini model (gemini-1.5-flash-002) using Vertex AI. The error message I'm receiving is as follows:

Plain Text
ERROR: Unknown field for GenerationConfig: safety_settings

 File "/workspaces/CORTEX/.venv/lib/python3.10/site-packages/llama_index/llms/vertex/base.py", line 384, in achat
   generation = await acompletion_with_retry(
 
 File "/workspaces/CORTEX/.venv/lib/python3.10/site-packages/llama_index/llms/vertex/utils.py", line 148, in acompletion_with_retry
   return await _completion_with_retry(**kwargs)


I suspect this may be an issue with llamaindex, potentially due to a recent Google update that affected some configurations. However, I am unsure of the root cause.

Version Details:
  • llama-index==0.11.14
  • llama-index-llms-vertex==0.3.6
  • google-ai-generativelanguage==0.6.4
  • google-generativeai==0.5.4
Steps to Reproduce:
Plain Text
llm = Vertex(...)
chat = await llm.achat(...)


Error: See above.

Relevant Logs/Tracebacks: No response.
10 comments
A
L
What is the best self-hosted observability tool you've been using or recommend?
4 comments
A
W
Do we have request_timeout to llms? I'm constantly having this problem with Gemini. I'm using llamaindex abstraction.
10 comments
A
L
Hi, everyone. I'm trying to get rid of some GPU dependencies on my project. But I cannot identify which dependencies are installing gpu dependencies such as "NVIDIA clu". I spotted the transformers one. And installed the torch version already. Can someone help me getting rid of the GPU dependencies?

Plain Text
pyproject.toml
[tool.poetry]
...

[tool.poetry.dependencies]
python = ">=3.10.11,<=3.11.5"
uvicorn = {extras = ["standard"], version = "^0.25.0"}
fastapi = "^0.109.0"
pyyaml = "^6.0.1"
injector = "^0.21.0"
overrides = "^7.7.0"
langchain = "^0.1.10"
langchain-google-genai = "0.0.8"
json-repair = "^0.9.0"
unstructured = {extras = ["all-docs"], version = "^0.14.2"}
opencv-python-headless = "^4.9.0.80"
jq = "^1.6.0"
pytesseract = "^0.3.10"
pymilvus = "^2.3.6"
langchain-openai = "^0.0.8"
scikit-learn = "^1.4.1.post1"
transformers = "^4.38.2"
ruff = "^0.3.1"
pandas = "^2.2.1"
llama-index = "^0.10.33"
python-multipart = "^0.0.9"
llama-index-vector-stores-milvus = "^0.1.10"
playwright = "^1.43.0"
python-magic = "^0.4.27"
llama-index-llms-gemini = "0.1.6"
opencv-python = "^4.9.0.80"
llama-index-llms-anthropic = "^0.1.11"
llama-index-llms-ollama = "^0.1.5"
llama-index-embeddings-ollama = "^0.1.2"
pymupdf = "^1.24.4"
pypdf = {extras = ["image"], version = "^4.2.0"}
surya-ocr = "^0.4.12"
llama-index-multi-modal-llms-ollama = "^0.1.3"
llama-index-llms-groq = "^0.1.4"
gensim = "^4.3.2"
firebase-admin = "^6.5.0"
demjson3 = "^3.0.6"
3 comments
A
L
But I'm not able to get it's original type again... to pass into the parser.


Plain Text
async def get_docs(self) -> List[Document]:
        """Get the parsed documents from llamaparse."""
        documents = []
        with tempfile.NamedTemporaryFile(delete=True) as temp:
            temp.write(base64.b64decode(self.b64))
            temp.flush()
            temp.seek(0)
            parser = LlamaParse(result_type=self.result_type)
            documents = await parser.aload_data(temp.name)

        return documents

Plain Text
Error while parsing the file '/var/folders/d1/p4s8h3q552xbvq30g272vdbh0000gn/T/tmpqgr4rzp3': Currently, only the following file types are supported: ['.pdf', '.doc', '.docx', '.docm', '.dot', '.dotx', '.dotm', '.rtf', '.wps', '.wpd', '.sxw', '.stw', '.sxg', '.pages', '.mw', '.mcw', '.uot', '.uof', '.uos', '.uop', '.ppt', '.pptx', '.pot', '.pptm', '.potx', '.potm', '.key', '.odp', '.odg', '.otp', '.fopd', '.sxi', '.sti', '.epub', '.html', '.htm']
`
3 comments
A
L
Are agents really necessary? Because, from what I've seen, I can do anything with just prompt engineering and normal api calls... or by doing it manually...

example; a RAG agent.

I can go to the vector store and use the right api calls to get the embeddings, nodes, AI api calls etc.

Agents seems useless and just a beautiful word to custom pipelines... can someone tell me the utility of them?
6 comments
L
A
Why we cannot use Claude 3 haiku in llamaindex?
9 comments
A
W
Issue with asyncio.run inside PropertyGraphIndex when running an API
 
Problem:
I'm working on ingesting documents into my PropertyGraphIndex while running an API that uses llamaindex. However, I encounter a RuntimeError because llamaindex is using asyncio.run inside the SchemaLLMPathExtractor, which conflicts with the running event loop in my API.
 
The error message I receive is:
Plain Text
RuntimeError: asyncio.run() cannot be called from a running event loop

I don't need this process to be asynchronous, I just need the ingestion to work properly in the existing API environment.
 
Here’s the problematic part of the code:
Plain Text
return asyncio.run(self.acall(nodes, show_progress=show_progress, **kwargs))

 
Does anyone have suggestions on how to handle this? Ideally, I want to make the ingestion work without needing to modify the event loop or make the ingestion process asynchronous.
 
Relevant Code Snippet:
Plain Text
kg_extractor: SchemaLLMPathExtractor = SchemaLLMPathExtractor(
    llm=llm,
    possible_entities=entity.entities.as_literal_typealias(),
    possible_relations=entity.relationships.as_literal_typealias(),
    kg_validation_schema=entity.validation_schema,
    strict=True,
    num_workers=4,
)
 
index = PropertyGraphIndex.from_existing(
    property_graph_store=self.client,
    llm=llm,
    kg_extractors=[kg_extractor],
    use_async=False,
    embed_model=embeddings,
    show_progress=True,
)
 
for document in documents:
    index.insert(document)

 
Any tips or workarounds to handle this issue in a synchronous API? Thanks in advance!
8 comments
A
L
Organizing data into separate communities in neo4j with llamaindex


I'm working with Neo4j property graphs and using llamaindex, but I have a specific use case that I need help with. Most tutorials show how to load documents at load time, but I need to insert documents dynamically at runtime.

Also, I want to organize the data into different "tables" (I think they're called communities in Neo4j?), so I can store related entities and relationships in separate areas. For example, I want a "marketing" place, an "academic/graduation" place, and so on. Basically, different spaces for different types of graphs.
10 comments
A
d
L
In a Propert Graph, can I have multiple "tables" to store different kinds of graphs? How can I achieve that in LlamaIndex? Like, I want to have a "table" for graphs related to students, a graph related to medical stuff etc.

Is it the "database" parameter I pass to the Neo4jGraphStore?
3 comments
A
Why not possible_entities = Optional[List[str]]????
9 comments
L
A
Why does the RAG pipeline presented in most documentation examples seems wrong?


I've been studying these various frameworks like llama-index and langchain recently. I've noticed that all the examples they give are like this:


read a document from a folder/source -> create a "vector store" based on the documents -> querying the llm using the context of the created vector store


In most cases, we have to generate embeddings of the documents (or nodes) when ingesting them inside the vector store. Isn't this approach kind of not optimal? Because when the application is off, I'd have to generate the embeddings of the same documents over and over again, generating waste of resources.

Note that I didn't send any piece of code here, I'm talking about the general workflow.

I've found a way to do the ingestion phase and the QA phase separately in langchain. I'm now migrating this method to Llamaindex, which I think will be more optimal because I really liked what llamaparse does for better parsing documents. The ingestion is done separately from the QA and all of them are asynchronous processes.

Is this process presented by most documentations really wrong or am I missing something? I'm still studying the documentations but slowly because this is not my priority right now.
22 comments
A
L