Putting Prompt Engineering into Action

Jahnvi s -

This week, I took the next big step in my project—I wrote the actual code to integrate prompt engineering into my program. After spending last week learning the fundamentals and experimenting with prompt structure, I was finally ready to build the actual program. 

The goal of this part of the project is to take the same input data that I used for training my neural networks and pass it to OpenAI’s model through carefully designed prompts. I built a system where, for each data sample, my code dynamically generates a natural language prompt that describes the patient’s symptoms, history, or other relevant features and asks the model to predict whether they might have a certain disease. The response is then parsed and compared with my neural network’s prediction.

Writing the code involved learning how to format and clean the data so that it could be turned into meaningful, structured prompts. I had to figure out how to phrase the input in a way that was both informative and concise. I also worked on getting the API calls correct, deciding on parameters like temperature and max tokens to balance response quality and consistency. Once that was set up, I ran the model on a subset of the data and started collecting predictions.

Now that I’ve automated the prompt generation and response collection, I’m starting to build the comparison logic. The idea is to look at both outputs—mine and OpenAI’s—and see where they agree or disagree. I’m especially excited to analyze patterns in the mismatches and figure out what they reveal about the strengths and weaknesses of each approach.

I’m looking forward to refining the system and running it on a larger scale soon. Stay tuned!

More Posts

Comments:

All viewpoints are welcome but profane, threatening, disrespectful, or harassing comments will not be tolerated and are subject to moderation up to, and including, full deletion.

    eesha_s
    This is such a great step forward in your project Jahnvi! How are you planning to analyze the mismatches between your model and OpenAI’s? Are there specific patterns or metrics you're focusing on?
    Divya Ram
    I agree with Eesha, Jahnvi! You've made a great amount of progress. I'm curious as to what was one way you phrased your input in a way to make it both informative and concise? Could you give me an example?

Leave a Reply

Your email address will not be published. Required fields are marked *