[go: up one dir, main page]

Open Domain Question Answering

Open Domain Question Answering with LLMs

Background

The following prompt tests an LLM's capabilities to answer open-domain questions which involves answering factual questions without any evidence provided.

⚠️

Note that due to the challenging nature of the task, LLMs are likely to hallucinate when they have no knowledge regarding the question.

Prompt

In this conversation between a human and the AI, the AI is helpful and friendly, and when it does not know the answer it says "I don’t know".
 
AI: Hi, how can I help you?
Human: Can I get McDonalds at the SeaTac airport?

Code / API

from openai import OpenAI
client = OpenAI()
 
response = client.chat.completions.create(
model="gpt-4",
messages=[
    {
    "role": "user",
    "content": "In this conversation between a human and the AI, the AI is helpful and friendly, and when it does not know the answer it says \"I don’t know\".\n\nAI: Hi, how can I help you?\nHuman: Can I get McDonalds at the SeaTac airport?"
    }
],
temperature=1,
max_tokens=250,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)

Reference