• Stars
    star
    171
  • Rank 222,266 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 1 year ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

GPT-4 Equipped with Numeric Calculation

GPT-4 Equipped with Numeric Calculation

GPT-4 has trouble with calculating with numbers. We look at a technique to fix that.

Read the report - GPT-4 Equipped with Numeric Calculation

Read the evaluation

Code is a stripped and repurposed version of "prbot" by @dsyme, @acr31, @wunderalbert, @max-schaefer, @mattrothenberg, @drifkin.

NOTE: The default model used when running this code is OpenAI's text-davinci-003 and not GPT-4. The code can be adjusted to run against any completion API by changing the settings in src/engine/options.ts and src/engine/settings.ts.

When writing this report, we evaluated the technique using the completion API of a private release of GPT-4. The public release of GPT-4 currently only provides a "chat" API. As a result some aspects of the technique described may need to be reworked because of this, however we are providing the code and our investigation for reference. We believe the evaluation results remain valid although some variation in numbers is to be expected.

Requirements

sudo apt-get install npm
npm install
npm run build

Examples

Define an API key:

export OPENAI_API_KEY=...

Try your own question:

./gpte ask --question "What is sin(13.31) where the input is in degrees?"
./gpte ask --question "What is sin(13.31) where the input is in degrees?" --arith

./gpte ask --questionfile test/samples/number-years-grow-30.txt
./gpte ask --questionfile test/samples/number-years-grow-30.txt --arith

These examples require GPT-4 token window size, code generation and reasoning:

./gpte ask --questionfile test/samples/msft-report-snippet.txt
./gpte ask --questionfile test/samples/msft-report-snippet.txt --arith

./gpte ask --questionfile test/samples/msft-goog-report-snippets-compared.txt
./gpte ask --questionfile test/samples/msft-goog-report-snippets-compared.txt --arith

./gpte ask --questionfile test/samples/gap-lulemon-financial-reports-compared.txt
./gpte ask --questionfile test/samples/gap-lulemon-financial-reports-compared.txt --arith

With an appropriate model, entire problem sets can be evaluated using ./gpte eval.

License

This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.

Maintainers

Maintainers: @dsyme, @wunderalbert, @johanrosenkilde

Support

This project is a concluded technical investigation by GitHub Next. It is provided for reference.

Acknowledgement

This project includes a modified version of the ASDiv.xml dataset for numeric calculation problems, adapted primarily to clarify the precisions and formats required in answers, see the evaluation.

More Repositories

1

monaspace

An innovative superfamily of fonts for code
TypeScript
13,775
star
2

testpilot

Test generation using large language models
TypeScript
495
star
3

copilot-workspace-user-manual

📖 The user manual for GitHub Copilot Workspace
368
star
4

blocks

A set of files to use as input for Blocks.
333
star
5

vitale

TypeScript notebook for developers
TypeScript
163
star
6

githubnext

A public point of contact for GitHub Next
155
star
7

blocks-template

A template for creating custom Blocks.
TypeScript
112
star
8

blocks-examples

A set of example custom Blocks.
TypeScript
92
star
9

amalfi-artifact

Artifact accompanying our ICSE '22 paper "Practical Automated Detection of Malicious npm Packages"
Python
35
star
10

blocks-dev

TypeScript
18
star
11

universe-blocks-demo

JavaScript
14
star
12

spectrum

TypeScript
13
star
13

blocks-template-svelte

make GitHub Blocks with Svelte!
JavaScript
9
star
14

vscode-react-webviews

A sample/starter template for developing VS Code extensions with webviews
TypeScript
7
star
15

UpgrAIder

Upgrade deprecated/outdated code using LLMs and release notes
Python
7
star
16

llmorpheus

LLM-based mutation testing
TypeScript
5
star
17

tiny-svelte-fsm

A minimalistic finite state machine library for Svelte 5
TypeScript
4
star
18

blocks-template-react

make GitHub Blocks with React!
JavaScript
3
star
19

preview-block

TypeScript
2
star
20

universe-blocks-demo-blocks

CSS
2
star
21

followup-attention

Accompanying artifacts for the TSE paper "Follow-up Attention: An Empirical Study of Developer and Neural Model Code Exploration"
Jupyter Notebook
2
star
22

blocks-template-vue

make GitHub Blocks with Vue!
JavaScript
1
star
23

array-toolbox

This is going to get a thousand stars
JavaScript
1
star
24

blocks-howie-spike-busted

TypeScript
1
star
25

.github

1
star
26

emoji-block

TypeScript
1
star
27

blocks-runtime

runtime support for Blocks
TypeScript
1
star
28

azuresvelte

JavaScript
1
star
29

hello-world

Sample repository
TypeScript
1
star
30

azureswacookies

TypeScript
1
star
31

history-blocks

TypeScript
1
star