mpouillo/42-call-me-maybe ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python app for the 42 Call Me Maybe project that reads a JSON file of natural language prompts and another JSON file describing available functions, then uses a small local language model to pick the right function and arguments for each prompt.

I want the output to be a JSON array saved to the expected output file, with each item containing the original prompt, the chosen function name, and its parameters with the correct types. The tricky part is that the model has to be constrained so it only produces valid JSON and only uses the functions that are actually defined. Please make it reliable even with a small model, using token by token decoding or some similar guardrail approach instead of trusting the model blindly.

Keep it simple, clean, and easy to run with the provided Makefile commands. If you need to check current library docs online, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab