----------------------
Hmm, I don't know enough to give you a confident answer yet. However, you can find more information about setting the
response_mode
in the
Query Reference (
https://gpt-index.readthedocs.io/en/latest/reference/query.html).
For a list index, you can set the
response_mode
to
default
or
compact
when using the
query
function. For example:
index = GPTListIndex(documents)
# mode="default"
response = index.query("What did the author do growing up?", response_mode="default")
# mode="compact"
response = index.query("What did the author do growing up?", response_mode="compact")
For a keyword table index, you can set the
mode
to
default
,
simple
, or
rake
when using the
query
function. For example:
# build table with default GPTKeywordTableIndex
from gpt_index import GPTKeywordTableIndex, SimpleDirectoryReader
from IPython.display import Markdown, display
documents = SimpleDirectoryReader('data').load_data()
index = GPTKeywordTableIndex(documents)
# default
response = index.query("What did the author do after his time at Y Combinator?", mode="default")
display(Markdown(f"<b>{response}</b>"))
# simple
response = index.query("What did the author do after his time at Y Combinator?", mode="simple")
display(Markdown(f"<b>{response}</b>"))
# rake
response = index.query("What did the author do after his time at Y Combinator?", mode="rake")
display(Markdown(f"<b>{response}</b>"))
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------