Project

General

Profile

Feature #3641

Updated by Ram Kordale 5 months ago

Let the first cell contain all inputs. Inputs are questions_file, model, index, board, grade, subject, chapter_num, styles (which is an array of strings) 

 Also, set CONTEXT_SIZE to 40960. 

 questions_file has the format: 
 Chapter 1 
 E 
 Chapter 2 
 E 
 ... 

 where E is of the format: 
 E1 
 E2 
 ... 

 where Ei is of format  

 #$Exercise: <exercise#> (example: 1.2.5.1) 
 #$Question: <question> 
 #$Figure: List of <GCS URLs> with name <exercise #>.1.jpg, <exercise #>.2.jpg... 
 #$Answer: <answer> 

 -for every <style> in styles 
 --template[key, value] = ["stylexyz1abc", <style>] 
 --num_tokens=0 
 --for every question in the file 
 --prompt=<question> 
 --response,num_tokens=call_openai_api(version=1.0, prompt, template, "temperature": 1, "max_tokens": 4096, "top_p": 1, "frequency_penalty": 0, "presence_penalty": 0, prompt) 
 ---if (num_tokens > CONTEXT_SIZE) num_tokens=0 
 ---styled_question = content between "###---###---###" 
 ---store styled_question and answer with key <board>-<grade>-<subject>-<chapter>-<exercise>-<style> 
 ---if <board>-<grade>-<subject>-<chapter>-<exercise>-standard does not exist 
 ----store <question> and answer with key <board>-<grade>-<subject>-<chapter>-<exercise>-standard. 


 You can start with a single entry file such as  
 #$Exercise: 1.2.5.1 
 #$Question: Maya dyes dresses. She had to dye 30 dresses. She has so far finished 20 dresses. What fraction of dresses has she finished? 
 #$Answer: 2/3 

Back