Find answers from the community

Home
Members
Richard G
R
Richard G
Offline, last seen 3 months ago
Joined September 25, 2024
Using a data warehouse eg BigQuery/Snowflake with LlamaIndex
7 comments
R
I'm using a Google's (outdated) BigQuery dialect for SQLAlchemy which I think may be problematic. If anyone can suggest a better way to work with BQ that'd be appreciated! But I've found an issue which I don't think is specific to that concern. Occasionally, I get an error DatabaseError: (google.cloud.bigquery.dbapi.exceptions.DatabaseError) 400 Syntax error: Expected end of input but got identifier "SQLQuery" at [1:1] when using SQLTableRetrieverQueryEngine. It looks like this part of the prompt ("SQLQuery:") isn't being trimmed from the SQL statement before it's put to BQ. There's a function _parse_response_to_sql (https://github.com/jerryjliu/llama_index/blob/be0ded30701f45bd097b30a00fa93d2cdf06a592/llama_index/indices/struct_store/sql_query.py#L242) which attempts to trim according to the position of "SQLResult:" but there's no trimming going on for "SQLQuery:".
15 comments
L
R
Hi all - can anyone ( !) please explain the difference between SQL Auto Vector Query Engine and SQL Query Join Engine? It looks like Join is more recent, and more flexible (in that any other engine can be used whereas Auto Vector only supports SQL + Vector DB) - is that right?
20 comments
L
R
Is it straightforward to use langchain document loaders (e.g. PDFPlumberLoader) with Llama Index please?
4 comments
R
L
R
Richard G
·

Demo

Hi all - I'm experimenting with Sub Question Query Engine as per https://gpt-index.readthedocs.io/en/latest/examples/query_engine/sub_question_query_engine.html. I've adapted the code to work with Vertex AI, but (Langchain LLMs/embedding). I'm struggling to make the demo work: SyntaxError: 'await' outside function caused by the line response = await query_engine.aquery(.... Any ideas what I'm doing wrong? Feels like this might be a really stupid question...
2 comments
R
L
Is it possible to persist storage for instances of ObjectIndex please?
Plain Text
    storage_context = StorageContext.from_defaults()

    obj_index = ObjectIndex.from_objects(
        table_schema_objs,
        table_node_mapping,
        VectorStoreIndex,
        storage_context=storage_context,
    )

    storage_context.persist(persist_dir=persist_dir)
2 comments
L
Hey all - thank you for any help you can spare. I'm familiarising with LlamaIndex, and am using VertexAI (LangChain) and getting some good results. But I can't work out however how to expose the actual prompts that are being presented to the LLM. Pretty sure this should be straightforward... I want to check that SQLTableShema objects I've built are being included in context correctly.
19 comments
R
L