Prompting improvements - #229
Open
gunnarrl wants to merge 9 commits into
Open
Conversation
added 9 commits
August 7, 2026 09:14
tbennun
requested changes
Aug 28, 2026
tbennun
left a comment
Collaborator
There was a problem hiding this comment.
LGTM apart from some prompt comments
| @@ -0,0 +1,65 @@ | |||
| try: | |||
| + "If the evaluation fails, propose a new retrosynthetic step and evaluate it again. " | ||
| ) | ||
| Task: | ||
| Find the best one-step retrosynthetic path to the target. Use available tools to verify each candidate; if a required tool is unavailable, perform the |
Collaborator
There was a problem hiding this comment.
"best" is ill-defined, the following might be better
Suggested change
| Find the best one-step retrosynthetic path to the target. Use available tools to verify each candidate; if a required tool is unavailable, perform the | |
| Find the best ranked one-step retrosynthetic path to the target. Use available tools to verify each candidate; if a required tool is unavailable, perform the |
Comment on lines
+57
to
+59
| 5. Evaluate the implied forward reaction. The reactants should regenerate the target in one step without adding, deleting, or rearranging unrelated atoms. | ||
| 6. If `predict_reaction_products` is available, use it to predict products from the proposed reactants, then canonicalize and compare the predicted | ||
| product with the target. If there is any inconsistency log it and try some other set of reactants. |
Collaborator
There was a problem hiding this comment.
Shouldn't 5 and 6 be merged?
| 5. Evaluate the implied forward reaction. The reactants should regenerate the target in one step without adding, deleting, or rearranging unrelated atoms. | ||
| 6. If `predict_reaction_products` is available, use it to predict products from the proposed reactants, then canonicalize and compare the predicted | ||
| product with the target. If there is any inconsistency log it and try some other set of reactants. | ||
| 7. If prediction tools are unavailable, perform the same forward-product equivalence check by chemical reasoning. |
Collaborator
There was a problem hiding this comment.
Repeating the statement in "Task:"
| product with the target. If there is any inconsistency log it and try some other set of reactants. | ||
| 7. If prediction tools are unavailable, perform the same forward-product equivalence check by chemical reasoning. | ||
| 8. If a candidate fails validation or there is any inconsistency, diagnose the issue, log it, and try another candidate. | ||
| 9. Choose the best validated step. |
Collaborator
There was a problem hiding this comment.
Suggested change
| 9. Choose the best validated step. | |
| 9. Choose the best validated step according to the ranking criteria below. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed the main retrosynthesis prompt to one that performed better on benchmarks. It adds in the AI preferred name and functional groups into the prompt along with making it more structured. Must have the new molecules.db in place before merging.
Also will now display the AI preferred name for a molecule if it doesn't exist in the current inchi lookup table.