Commit 695dbf0
authored
fix(ace): Refine reflector to use only input fields (#464)
The AxACE optimizer's reflector was previously using the entire training example as the "question" for reflection, including output fields. This caused confusion, as the reflector was seeing both the inputs and the expected outputs, leading to inaccurate and unhelpful reflections.
This commit fixes the issue by ensuring that only the input fields from an example are used as the "question" for the reflector. The code now retrieves the program's signature, identifies the defined input fields, and constructs a `questionContext` object containing only the input key-value pairs from the full example.
By providing a clean separation between the input and output, the reflector can now generate more accurate and relevant insights, improving the overall effectiveness of the ACE optimization loop.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent d4acef2 commit 695dbf0
1 file changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
977 | 989 | | |
978 | | - | |
| 990 | + | |
979 | 991 | | |
980 | 992 | | |
981 | 993 | | |
| |||
0 commit comments