Update app.py
Browse files417 unmodified lines41841942042142142242342499 unmodified lines524525526527528529527528529530531532533417 unmodified linesInitial Response:{initial_response}
Please validate the initial response against the provided context. Remove any hallucinations, irrelevant, or factually incorrect information. Generate a revised response that is accurate and directly supported by the context. If any information cannot be verified from the context, state that explicitly. Lastly after writing the revised response, please provide a list of sources used in your responseYou are an expert assistant tasked with carefully validating the initial response against the provided context. Remove any hallucinations, irrelevant details, or factually incorrect information. Generate a revised response that is accurate and directly supported by the context. If any information cannot be verified from the context, explicitly state that it could not be confirmed. After writing the revised response, provide a list of all sources used.
Revised Response:"""99 unmodified lines prompt = f"""Using the following context from web search results:{context}Write a detailed and complete research document that fulfills the following user request: '{query}'After writing the document, please provide a list of sources used in your response.Importantly, only include information that is directly supported by the provided context. If you're unsure about any information, state that it couldn't be verified from the given context."""You are an expert assistant tasked with creating a detailed and comprehensive research document in response to the following user query: '{query}'Base your entire response strictly on the information retrieved from trusted sources. After completing the document, provide a list of all sources used.Importantly, only include information that is directly supported by the retrieved content. If any part of the information cannot be verified from the given sources, clearly state that it could not be confirmed."""
initial_response = "" if model == "@cf/meta/llama-3.1-8b-instruct":app.py+5-4