Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💬 Prompt updates #48

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

💬 Prompt updates #48

wants to merge 2 commits into from

Conversation

tylermaran
Copy link
Contributor

No description provided.

@pradhyumna85
Copy link
Contributor

@tylermaran, I am thinking that we can define a JSON which has constants like the default system prompt which both the JS and Python SDK could use this JSON to load the default system prompt. This will reduce redundancy across zerox's SDKs.

@tylermaran
Copy link
Contributor Author

Hey @pradhyumna85, agreed. We could definitely have a shared prompt library. As well as some shared tests. Since it's really hard to tell how the output changes with a prompt change.

On the subject of shared code, I'm planning on writing some tests that do something like:

  • Run ~10 documents through
  • Do a regex test on the resulting markdown for a bunch of discrete indicators that we know it should contain.

ex:
If we ran this doc: https://github.com/getomni-ai/zerox/blob/main/examples/cs101.pdf

We could do a regex test

const bits = [
  "byte",
  "16-bit signed 2s complement integer",
  "Short",
  "32-bit signed 2s complement integer",
  "Integer",
  "64-bit signed 2s complement integer",
  "Long",
  "float",
  "32-bit IEEE 754 floating point number"
  ]

const countMatches = (text) => {
  const pattern = new RegExp(bits.join('|'), 'g');
  const matches = text.match(pattern);
  return matches ? matches.length : 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants