In the previous few videos, we discussed how to build an application using an OM and the process of evaluating the inputs to processing the inputs to then doing final output checking before showing the output to the user. Now, let’s focus on how to evaluate the outputs of an LM and improve the quality of the answers in the system.
When building an application using an LM, the evaluation process is different from traditional supervised learning applications. Since you can build such applications quickly, the methods for evaluating them tend not to start with a test set. Instead, you gradually build up a set of test examples.
To evaluate the outputs of an LM, you first tune the prompts on a small handful of examples and try to get a prompt that works well on them. As you test the system, you may come across examples where the prompt doesn’t work well. In such cases, you can add these additional examples to the set you’re testing on and opportunistically add more tricky examples.
Eventually, you will have enough examples in your development set to start developing metrics to measure the performance of the system. You can calculate metrics such as average accuracy to evaluate the system’s performance on this small set of examples.
If your hand-built development set isn’t giving you sufficient confidence in the system’s performance, you may collect a randomly sampled set of examples to further tune the model. This set can serve as a development set or a holdout cross-validation set.
It’s important to note that the size and rigor of the development set depend on the application and the level of risk involved. For applications where there is a risk of harm, it is crucial to collect a test set to rigorously evaluate the system’s performance before deployment.
However, for applications where the risk of harm is low, you can stop at the development set and use metrics to measure the system’s performance. It’s important to strike a balance between the level of rigor needed and the resources available.
In summary, evaluating the outputs of an LM involves gradually building a development set of test examples, tuning the prompts, and measuring the system’s performance using metrics. The size and rigor of the development set depend on the application’s requirements and the level of risk involved. By following this evaluation process, you can improve the quality of the answers in your system.