This website requires JavaScript.
Explore
Help
Sign In
Archives
/
gristlabs_grist-core
Watch
1
Star
0
Fork
0
You've already forked gristlabs_grist-core
mirror of
https://github.com/gristlabs/grist-core.git
synced
2024-10-27 20:44:07 +00:00
Code
Issues
Projects
Releases
Wiki
Activity
0c609adef0
gristlabs_grist-core
/
test
/
formula-dataset
/
.gitignore
4 lines
39 B
Plaintext
Raw
Normal View
History
Unescape
Escape
(core) Porting the AI evaluation script Summary: Porting script that run an evaluation against our formula dataset. To test you need an openai key (see here: https://platform.openai.com/) or hugging face (it should work as well), then checkout the branch and run `OPENAI_API_KEY=<my_openai_api_key> node core/test/formula-dataset/runCompletion.js` Test Plan: Needs manually testing: so far there is no plan to make it part of CI. The current score is somewhere around 34 successful prompts over a total of 47. Reviewers: paulfitz Reviewed By: paulfitz Subscribers: jarek Differential Revision: https://phab.getgrist.com/D3816
2023-03-15 08:52:17 +00:00
data/templates
data/cache
(core) Improve parsing formula from completion Summary: The previous code for extracting a Python formula from the LLM completion involved some shaky string manipulation which this improves on. Overall the 'test results' from `runCompletion` went from 37/47 to 45/47 for `gpt-3.5-turbo-0613`. The biggest problem that motivated these changes was that it assumed that code was always inside a markdown code block (i.e. triple backticks) and so if there was no block there was no code. But the completion often consists of *only* code with no accompanying explanation or markdown. By parsing the completion in Python instead of JS, we can easily check if the entire completion is valid Python syntax and accept it if it is. I also noticed one failure resulting from the completion containing the full function (instead of just the body) and necessary imports before that function instead of inside. The new parsing moves import inside. Test Plan: Added a Python unit test Reviewers: paulfitz Reviewed By: paulfitz Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D3922
2023-06-16 11:23:35 +00:00
data/results
Reference in New Issue
Copy Permalink