Adding context for smarter AI responses

AI-Assisted Coding for Developers

Francesca Donadoni

AI Curriculum Manager, DataCamp

Prompt refinement

50.png

AI-Assisted Coding for Developers

Prompt refinement

51.png

AI-Assisted Coding for Developers

Prompt refinement

52.png

AI-Assisted Coding for Developers

Prompt refinement

prompt_refinement.gif

AI-Assisted Coding for Developers

Contextual prompting

Providing the right context so the model has all the necessary information to complete the task.

56.png

AI-Assisted Coding for Developers

Contextual prompting

Providing the right context so the model has all the necessary information to complete the task.

57.png

AI-Assisted Coding for Developers

Contextual prompting

contextual_prompting.gif

AI-Assisted Coding for Developers

Contextual prompting

Minimal prompt: "I am getting a ConnectionError in my python script. How can I fix it?"

Model response: model_response_1.png

AI-Assisted Coding for Developers

Contextual prompting

Full context: "I am getting the following error in my python script: <paste error message>. How can I fix it?"

Model response:

model_response_2.png

AI-Assisted Coding for Developers

Let's practice!

AI-Assisted Coding for Developers

Preparing Video For Download...