schema_str
, info_str
, and query_str
. These variables are used to customize the prompt template. prompt_tmpl_str = """\ Your goal is to structure the user's query to match the request schema provided below. << Structured Request Schema >> When responding use a markdown code snippet with a JSON object formatted in the following schema: {schema_str} The query string should contain only text that is expected to match the contents of documents. Any conditions in the filter should not be mentioned in the query as well. Make sure that filters only refer to attributes that exist in the data source. Make sure that filters take into account the descriptions of attributes. Make sure that filters are only used as needed. If there are no filters that should be applied return [] for the filter value. If the user's query explicitly mentions number of documents to retrieve, set top_k to that number, otherwise do not set top_k. Do NOT EVER infer a null value for a filter. This will break the downstream program. Instead, don't include the filter. """
schema_str
is used to format the request schema, info_str
is used to provide additional information, and query_str
is used to structure the user's query.print()
function in Python. For example, if you have a function that completes prompts and stores the result in a variable named response
, you can print this response using print(response)
.llm.complete()
function to complete prompts, you can print the response as follows:response = llm.complete(prompt) print(response)