ChainForge/chainforge/oaievals/atpl_exams.cforge

1 line
8.6 KiB
Plaintext
Raw Permalink Normal View History

TypeScript backend, HuggingFace models, JavaScript evaluators, Comment Nodes, and more (#81) * Beginning to convert Python backend to Typescript * Change all fetch() calls to fetch_from_backend switcher * wip converting query.py to query.ts * wip started utils.js conversion. Tested that OpenAI API call works * more progress on converting utils.py to Typescript * jest tests for query, utils, template.ts. Confirmed PromptPipeline works. * wip converting queryLLM in flask_app to TS * Tested queryLLM and StorageCache compressed saving/loading * wip execute() in backend.ts * Added execute() and tested w concrete func. Need to test eval() * Added craco for optional webpack config. Config'd for TypeScript with Node.js packages browserify'd * Execute JS code on iframe sandbox * Tested and working JS Evaluator execution. * wip swapping backends * Tested TypeScript backendgit status! :) woot * Added fetchEnvironAPIKeys to Flask server to fetch os.environ keys when running locally * Route Anthropic calls through Flask when running locally * Added info button to Eval nodes. Rebuilt react * Edits to info modal on Eval node * Remove/error out on Python eval nodes when not running locally. * Check browser compat and display error if not supported * Changed all example flows to use JS. Bug fix in query.ts * Refactored to LLMProvider to streamline model additions * Added HuggingFace models API * Added back Dalai call support, routing through Flask * Remove flask app calls and socketio server that are no longer used * Added Comment Nodes. Rebuilt react. * Fix PaLM temp=0 build, update package vers and rebuild react
2023-06-30 15:11:20 -04:00
{"flow": {"nodes": [{"width": 312, "height": 311, "id": "prompt-atpl_exams", "type": "prompt", "data": {"prompt": "{prompt}", "n": 1, "llms": [{"key": "aa3c0f03-22bd-416e-af4d-4bf5c4278c99", "settings": {"system_msg": "Instructions: You will be presented with an aviation question and four options from A to D. Your role is to choose the option that is most likely correct. For each question, you should choose one answer option. There is no need to explain anything. Just answer with a single letter.", "temperature": 1, "functions": [], "function_call": "", "top_p": 1, "stop": [], "presence_penalty": 0, "frequency_penalty": 0}, "name": "GPT3.5", "emoji": "\ud83d\ude42", "model": "gpt-3.5-turbo", "base_model": "gpt-3.5-turbo", "temp": 1, "formData": {"shortname": "GPT3.5", "model": "gpt-3.5-turbo", "system_msg": "Instructions: You will be presented with an aviation question and four options from A to D. Your role is to choose the option that is most likely correct. For each question, you should choose one answer option. There is no need to explain anything. Just answer with a single letter.", "temperature": 1, "functions": "", "function_call": "", "top_p": 1, "stop": "", "presence_penalty": 0, "frequency_penalty": 0}}]}, "position": {"x": 448, "y": 224}, "selected": false, "positionAbsolute": {"x": 448, "y": 224}, "dragging": false}, {"width": 333, "height": 182, "id": "eval-atpl_exams", "type": "evaluator", "data": {"code": "function evaluate(response) {\n\tlet ideal = response.meta['Ideal'];\n\treturn response.text.startsWith(ideal);\n}", "language": "javascript"}, "position": {"x": 820, "y": 150}, "positionAbsolute": {"x": 820, "y": 150}}, {"width": 228, "height": 196, "id": "vis-atpl_exams", "type": "vis", "data": {"input": "eval-atpl_exams"}, "position": {"x": 1200, "y": 250}, "positionAbsolute": {"x": 1200, "y": 250}}, {"width": 302, "height": 260, "id": "inspect-atpl_exams", "type": "inspect", "data": {"input": "prompt-atpl_exams"}, "position": {"x": 820, "y": 400}, "positionAbsolute": {"x": 820, "y": 400}}, {"width": 423, "height": 417, "id": "table-atpl_exams", "type": "table", "data": {"rows": [{"prompt": "The Transition Level: A) shall be the lowest flight level available for use above the transition altitude B) shall be the highest available flight level below the transition altitude that has been established C) is calculated and declared for an approach by the Pilot-in command D) is published for the aerodrome in the Section ENR of the AIP. Reply by choosing one of the following answers: 'A', 'B', 'C', 'D'.", "ideal": "A"}, {"prompt": "LFCG 221100Z 1219 22010KT 4500 RA BKN010 OVC015 TEMPO 1500 + RA OVC005 FM1430 29020G35KT 6000 SHRA BKN008TCU OVC015 TEMPO 1619 25010 KT 9999 NSW BKN020 PROB30 TEMPO 1619 1500 TSGR BKN007CB What is the lowest cloud base you may encounter at 1345Z? A) 700 ft B) 1000 ft C) 500 ft D) 12.000 ft. Reply by choosing one of the following answers: 'A', 'B', 'C', 'D'.", "ideal": "C"}, {"prompt": "What approximate rate of descent is required in order to maintain a 3\u00b0 glide path at a groundspeed of 120 kt? A) 600 FT/MIN. B) 950 FT/MIN. C) 550 FT/MIN. D) 800 FT/MIN. Reply by choosing one of the following answers: 'A', 'B', 'C', 'D'.", "ideal": "A"}, {"prompt": "The colour used on the B737-400 EHSI weather display to show turbulence is: A) flashing red. B) white or magenta. C) high colour gradient. D) magenta. Reply by choosing one of the following answers: 'A', 'B', 'C', 'D'.", "ideal": "D"}, {"prompt": "According to ICAO Document 8168 Part V, when using Procedure A for noise abatement, when must you reduce power: A) 2000 ft. B) 3000 ft. C) 1500 ft. D) 1000 ft. Reply by choosing one of the following answers: 'A', 'B', 'C', 'D'.", "ideal": "C"}, {"prompt": "In the ATS flight plan Item 10 (equipment), the letter to indicate the carriage of a serviceable transponder - mode A (4 digits-4096 codes) and mode C, is: A) A B) P C) C D) B Reply by choosing one of the following answers: 'A', 'B', 'C', 'D'.", "ideal": "C"}, {"prompt": "The words TAKE OFF are only to be used when: A) An aircraft is cl