From d88f79bc5e67b33c94ad11d79b58ee48b7683467 Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Wed, 21 Jun 2023 13:58:43 +0200 Subject: [PATCH] (core) Add cases involving lookups to formula dataset Summary: I looked through the template documents mentioned in `formula-dataset-index.csv` and selected formulas involving lookups to add to the CSV, particularly nontrivial formulas. Test Plan: Running the test script on the new dataset gives a score of 47/61 compared to the previous 45/47, i.e. it scores 2/14 on the new entries. Lookups are clearly challenging and we'll need to add more information to the prompt, maybe even consider a more complicated strategy than a single prompt. This diff is purely for expanding the dataset, improving performance will come later. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3931 --- .../formula-dataset/data/formula-dataset-index.csv | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/formula-dataset/data/formula-dataset-index.csv b/test/formula-dataset/data/formula-dataset-index.csv index e94b8f41..56e381c9 100644 --- a/test/formula-dataset/data/formula-dataset-index.csv +++ b/test/formula-dataset/data/formula-dataset-index.csv @@ -1,9 +1,13 @@ table_id,col_id,doc_id,Description Contacts,Send_Email,hQHXqAQXceeQBPvRw5sSs1,"Link to compose an email, if there is one" +Contacts,No_Notes,hQHXqAQXceeQBPvRw5sSs1,"Number of notes for this contact" +Category,Contains_archived_project_,hQHXqAQXceeQBPvRw5sSs1,"Whether any projects in this category are archived" Tasks,Today,hQHXqAQXceeQBPvRw5sSs1,Needs to be done today (or every day) Tasks,Week_Day,hQHXqAQXceeQBPvRw5sSs1,Full name of deadline weekday +Tasks,period,hQHXqAQXceeQBPvRw5sSs1,Whether this task was modified between (inclusive) the dates in the single row in Settings Expenses,Month,55Q2EtTbFvB1N6iizLh4Rk,e.g. 2022-01 Payroll,Date_Range,5pHLanQNThxkEaEJHKJUf5,"The start date, followed by a dash (no spaces) and the end date if there is one. Dates are month/day with no leading zeroes." +Payroll,Per_Hour,5pHLanQNThxkEaEJHKJUf5,The hourly rate of the latest rate for this role and person that started on or before this date Payroll,Payment,5pHLanQNThxkEaEJHKJUf5,"Total payment amount for hours worked, rounded to the nearest cent." Payroll_summary_Pay_Period_Person,Dates,5pHLanQNThxkEaEJHKJUf5,"All date ranges in the group, separated by a comma and a space" People,Full_Name,5pHLanQNThxkEaEJHKJUf5,"e.g. Doe, John" @@ -11,8 +15,10 @@ General_Ledger,Quarter,2YwYBWpREY2a1N2NV7cb55,e.g. 2020 Q4 General_Ledger,Year,2YwYBWpREY2a1N2NV7cb55,"Just the year of the date, as a string" Time_Calculator,Time_Worked,np7TVHmuvFcHmo1K8h7Ur4,Formatted as hours:minutes. No leading zeroes for hours. Time_Calculator,Seconds_Worked,np7TVHmuvFcHmo1K8h7Ur4,"Number of seconds between start/end times, if they're both there" +Funding_Source,Percentage,qprycQa2TVwajAe6Hb3bUZ,Ratio of the amount to the total across all rows Funding_Source_summary,Debt_to_Equity,qprycQa2TVwajAe6Hb3bUZ,Ratio of the total amounts in the group where the type is Debt vs Equity Invoices,Client,bReAxyLmzmEQfHF5L5Sc1e,Client's name followed by their address on the next line +Invoices,Hours,bReAxyLmzmEQfHF5L5Sc1e,Total duration in hours across all time logs for this invoice Invoices,Due,bReAxyLmzmEQfHF5L5Sc1e,30 days after the invoice date Invoices,Invoice_ID,bReAxyLmzmEQfHF5L5Sc1e,Invoice date followed by the client's name in brackets Projects,Project_Name,bReAxyLmzmEQfHF5L5Sc1e,"Client name and project name, e.g. John Doe: Big project" @@ -30,6 +36,7 @@ Cap_Table,Common_Stock,iXggjrCPHut9u2BuhJxJkk,"If the class is Options, RSUs, or Cap_Table,Fully_Diluted,iXggjrCPHut9u2BuhJxJkk,"The granted amount, minus the total pool used if the class is Option Pool" Cap_Table,Fully_Diluted_,iXggjrCPHut9u2BuhJxJkk,Fully diluted as a fraction of the total Classes,Spots_Left,swLvb3Fic22gVzrdczcAoZ,or Full +Classes,Count,swLvb3Fic22gVzrdczcAoZ,Number of enrollments for this class where the status is Confirmed All_Survey_Responses,Product_Experience_Score,4ktYzGV1mUipSiQFtkLGqm,"A number based on the experience: Very Dissatisfied: 1 Somewhat Dissatisfied: 2 @@ -39,6 +46,7 @@ Very Satisfied: 5" Time_Sheet_Entries_summary_Account_Employee_Month,Total_Spend,oGxD8EnzeVs6vSQK3QBrUv,Total hours worked times hourly rate Time_Sheets,Title,oGxD8EnzeVs6vSQK3QBrUv,Month number and employee full name separated by a space All_Products,SKU,sXsBGDTKau1F3fvxkCyoaJ,"Brand code, color code, and size, separated by dashes without spaces" +All_Products,QTY_on_Order,sXsBGDTKau1F3fvxkCyoaJ,Total quantity minus total received quantity across all incoming order line items for this product All_Products,Stock_Alert,sXsBGDTKau1F3fvxkCyoaJ,"If the amount in stock and on order is more than 5: In Stock If it's 0: OUT OF STOCK Otherwise: Low Stock" @@ -46,10 +54,16 @@ Incoming_Order_Line_Items,Received_Qty,sXsBGDTKau1F3fvxkCyoaJ,"The quantity, but Theaters,Latitude2,dKztiPYamcCpttT1LT1FnU,Coordinate before the comma Theaters,Longitude,dKztiPYamcCpttT1LT1FnU,Coordinate after the comma and space Families,Amount_Due,cJcSKdUC3nLNAv4wTjAxA6,"Total charged minus total paid, capped at 0" +Families,Total_Applied,cJcSKdUC3nLNAv4wTjAxA6,Total charge for all paid sessions for this family Gifts_summary_Occasion_Who_Year,Over_Budget_,dr6epxpXUcy9rsFVUoXTEe,Did we spend more than the budget for this person? +Gifts_summary_Year,Total_Budget,dr6epxpXUcy9rsFVUoXTEe,Total budget for all important dates this year +Leases,Signer,5iMYwmESm33JpEECSqdZk2,The signing tenant for this lease Apartments,Have_Picture,5iMYwmESm33JpEECSqdZk2,Yes or No depending on if there's a picture +Apartments,Current_Lease,5iMYwmESm33JpEECSqdZk2,The lease for this apartment whose current status is Active +Current_Signers,Lease_Start_Date,5iMYwmESm33JpEECSqdZk2,The start date of the lease for this apartment whose current status is Active Leases,Lease_End_Date,5iMYwmESm33JpEECSqdZk2,Start date plus the lease term in years minus one day Tenancies,Minor,5iMYwmESm33JpEECSqdZk2,"1 if the age is less than 18, otherwise 0" Game_Schedule,Loser,1xJAp2uxM7tFCVUbEofKoF,The team that won fewer sets Standings,Win_Rate,1xJAp2uxM7tFCVUbEofKoF,Ratio of wins to total games +Standings,Wins,1xJAp2uxM7tFCVUbEofKoF,Number of games won Prepare_Invoices,Due,9NH6D58FmxwPP43nw7uzQK,One month after the issued date if there is one