Find answers from the community

Updated 2 years ago

Regarding the new Example for SQL Auto

At a glance

The community member posted about a potential mistake in the example for the SQL Auto Vector Query Engine from the GPT Index documentation. They questioned whether the service_context should also include the node_parser parameter. In the comments, another community member responded that the node_parser defined within the service_context would have the same settings, and that the node_parser defined there seems to be used further down in the example. There is no explicitly marked answer to the original question.

Useful resources
Regarding the new Example for SQL Auto Vector Query Engine (https://gpt-index.readthedocs.io/en/latest/examples/query_engine/SQLAutoVectorQueryEngine.html) I think I found a small mistake:
Plain Text
# define node parser and LLM
llm_predictor = LLMPredictor(llm=ChatOpenAI(temperature=0, model_name="gpt-4", streaming=True))
service_context = ServiceContext.from_defaults(chunk_size_limit=1024, llm_predictor=llm_predictor)
text_splitter = TokenTextSplitter(chunk_size=service_context.chunk_size_limit)
node_parser = SimpleNodeParser(text_splitter=text_splitter)


Shouldn't the service_context also include node_parser=node_parser ?
L
1 comment
It could, but the one instansiated inside the service context will have the same setting

the node parser defined there seems to be used further down https://gpt-index.readthedocs.io/en/latest/examples/query_engine/SQLAutoVectorQueryEngine.html#build-vector-index
Add a reply
Sign up and join the conversation on Discord