我想要一天分享一點「LLM從底層堆疊的技術」,並且每篇文章長度控制在三分鐘以內,讓大家不會壓力太大,但是又能夠每天成長一點。
回顧目前有的素材:
在 AI說書 - 從0開始 - 329 | Embedding Based Search GPT 的回答 中,面臨到 GPT 訓練資料無法回答的問題 (問的問題超過訓練資料截止時間),以下來添加額外知識庫,資料來源為:https://en.wikipedia.org/wiki/Curling_at_the_2022_Winter_Olympics
wikipedia_article_on_curling = """Curling at the 2022 Winter Olympics...
然後以上述資料為知識,重新詢問 GPT 模型:
query = f"""Use the below article on the 2022 Winter Olympics to answer the subsequent question. If the answer cannot be found, write "I don't know."
Article:
\"\"\"
{wikipedia_article_on_curling}
\"\"\"
Question: Which athletes won the gold medal in curling at the 2022 Winter Olympics?"""
response = client.chat.completions.create(messages = [{'role': 'system', 'content': 'You answer questions about the 2022 Winter Olympics.'},
{'role': 'user', 'content': query}],
model = GPT_MODEL,
temperature = 0)
print(response.choices[0].message.content)