Find answers from the community

Home
Members
Anindya
A
Anindya
Offline, last seen 3 months ago
Joined September 25, 2024
Hello folks, I am neew here, first of all Llama index is awesome, and I have been actually facing a problem, and I believe that the answer lies in llama index, (went through the documentation), but I still need some help.

So suppose I have been given a csv table of subject metadata, of different subject concepts. Example

Biology
chem
physics

Now in biology also there are even sub categories like

  1. physiology
  2. botany
similarly goes for chemistry and physics.

Now while I go to query something, before doing the embedding based similarity search, I wanted to now whether I can do this keyword based search first (keyword index or tree idk, a bit confused). Take these scenerio, I asked the question at first, and assuming my LLM (which is first forced to give a json metadata of the query like this)

Plain Text
text: ...
subject: ...
subject_department: [....] # the query can belong to more than one department 


now I will send it to my index so that my search space now becomes

Plain Text
biology
  - botany
  - genomics


Now I will do vector search all the document embeddings belonging to node (botany) and (genomics). And return the answer in some format (with metadata), so how can I do that? using llama-index any kind of pseduo code or something you guys can help me out?
4 comments
A
L
A
Anindya
·

Sql

Hello guys I was reading through this tutorial https://docs.llamaindex.ai/en/stable/examples/index_structs/struct_indices/duckdb_sql_query/?h=sql


Now can anyone please check if my understanding is correct, in the first section of the tutorial, NLSQLTableQueryEngine is used which essentially ONLY generates SQL from natural language and then runs it inside the database.

Whereas, SQLTableRetrieverQueryEngine is using Text2SQL but also additional embedding based retrieval for gathering additional information before passing the final context to the text2sql and then we get the final sql?
2 comments
A
L
Hey, I have one question, so can I do batched inference with llama-index LLMs. Lets take two examples

  1. For APIs like Open AI API
  2. Direct access of OSS LLMs like Llama
In both of the cases, am I able to do generation in batches (assuming I have a gpu in option 2) or do I have to do in a for loop.
2 comments
A
L