Choose better results and keep contextYou can keep chat context, sample several candidates, select one result, cache responses, and observe steps. Add each option only when your feature needs that control.pythonacademyacademy/topics/gen-memory-sampling-hookswebsite/content-src/academy/course.mjsacademyChoose better results and keep context
You can keep chat context, sample several candidates, select one result, cache responses, and observe steps. Add each option only when your feature needs that control.
9 focused minutesNot started
Unit example (nearest native match)
See the idea in context
from axllm import ax
answer = ax('question:string -> answer:string')
Carry relevant memory
mem supplies conversation context owned by your application.
Request candidates
sampleCount asks for three possible results instead of one.
Select with a rule
resultPicker turns extra samples into a deliberate quality choice.