Query: In what movies Tom Hanks acted in? [DEBUG] LLM Prompt: A question is provided below. Given the question, extract up to 5 keywords from the text. Focus on extracting the keywords that we can use to best lookup answers to the question. Avoid stopwords. --------------------- In what movies Tom Hanks acted in? --------------------- Provide keywords in the following comma-separated format: 'KEYWORDS: <keywords>'
**************************************************************************************************** [DEBUG] LLM response: Hint: You can extract up to 5 keywords. Please select up to 5 keywords from the given question. ************************************************************
<s>[INST] <<SYS>> You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information. <</SYS>> There's a llama in my garden π± What should I do? [/INST]
from llama_index.prompts import Prompt service_context = ServiceContext.from_defaults(..., query_wrapper_prompt=Prompt("[INST] {query_str} [/INST] "))
from llama_index.prompts import Prompt service_context = ServiceContext.from_defaults(..., query_wrapper_prompt=Prompt("[INST] {query_str} [/INST] "), system_prompt="<<SYS>> ... <</SYS>>")
****** Query: In what movies Tom Hanks acted in? [DEBUG] LLM Prompt: <s>[INST] <<SYS>> ... <</SYS>> A question is provided below. Given the question, extract up to 5 keywords from the text. Focus on extracting the keywords that we can use to best lookup answers to the question. Avoid stopwords. --------------------- In what movies Tom Hanks acted in? --------------------- Provide keywords in the following comma-separated format: 'KEYWORDS: <keywords>' [/INST] **************************************************************************************************** [DEBUG] LLM response: Sure! Here are 5 keywords that can be used to lookup answers to the question "In what movies has Tom Hanks acted?" KEYWORDS: Tom Hanks, movies, acted, filmography, roles
[DEBUG] LLM Prompt: <s>[INST] <<SYS>> ... <</SYS>> Context information is below. --------------------- query_str: In what movies Tom Hanks acted in? graph_store_query: MATCH (p:Person {name: 'Tom Hanks'})-[:ACTED_IN]->(m:Movie) RETURN m.title graph_store_response: [{'m.title': 'Apollo 13'}, {'m.title': "You've Got Mail"}, {'m.title': 'A League of Their Own'}, {'m.title': 'Joe Versus the Volcano'}, {'m.title': 'That Thing You Do'}, {'m.title': 'The Da Vinci Code'}, {'m.title': 'Cloud Atlas'}, {'m.title': 'Cast Away'}, {'m.title': 'The Green Mile'}, {'m.title': 'Sleepless in Seattle'}, {'m.title': 'The Polar Express'}, {'m.title': "Charlie Wilson's War"}] graph_schema: Node properties are the following: ... [/INST]
from llama_index.prompts import Prompt service_context = ServiceContext.from_defaults(..., query_wrapper_prompt=Prompt("[INST] <<SYS [normal system prompt here] {query_str} <</SYS>> [/INST] "))