Chain-of-thought pour dévoiler le raisonnement
On vous présente un problème de mathématiques courant pour déterminer le nombre de fruits dans un panier. Vous voulez que ChatGPT résolve ce problème pour vous tout en fournissant un raisonnement pas à pas.
La fonction get_response() pour communiquer avec ChatGPT est préchargée pour vous.
Cet exercice fait partie du cours
IA explicable en Python
Instructions
- Complétez le
promptafin d’obtenir un raisonnement chain-of-thought pour ce problème.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Complete the chain-of-thought prompt
prompt = "In a basket, there are twice as many apples as oranges and three times as many oranges as bananas. If there are 6 bananas in the basket, how many fruits are there in total? ____"
response = get_response(prompt)
print(response)