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

Example of Query understanding. #83

Merged
merged 7 commits into from
Apr 22, 2024
Merged

Example of Query understanding. #83

merged 7 commits into from
Apr 22, 2024

Conversation

jxnl
Copy link
Collaborator

@jxnl jxnl commented Jan 20, 2024

fixed!

@jxnl jxnl requested a review from roodboi January 20, 2024 00:05
Copy link

changeset-bot bot commented Jan 20, 2024

⚠️ No Changeset found

Latest commit: 284e4e9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR


const ExtractionValuesSchema = z.object({
rewrittenQuery: z.string().describe("Rewrite the query to be specific to the context. This will be used to do semantic search, so make sure it is specific to the context."),
questionType: z.array(z.string().describe("The type of question that is being asked. This will be used to determine the type of answer that is expected. MUST be one of the following: PERSONAL_DATA, INTERNET, TRANSCRIPTS")),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use a .enum(["PERSONAL_DATA", ...]) here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enum does not work while streaming

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm - why not? its just being set on the json schema right? Feel like I have had better accuracy defining enums - although I have 0 actual data to back up that claim lol

https://ss.dimitri.link/0G9V4s5n

roodboi
roodboi previously approved these changes Jan 20, 2024
Copy link

cloudflare-workers-and-pages bot commented Apr 20, 2024

Deploying instructor-js with  Cloudflare Pages  Cloudflare Pages

Latest commit: 284e4e9
Status: ✅  Deploy successful!
Preview URL: https://fb9f7271.instructor-js.pages.dev
Branch Preview URL: https://query-understanding.instructor-js.pages.dev

View logs

@roodboi roodboi merged commit 02bee9a into main Apr 22, 2024
3 checks passed
@roodboi roodboi deleted the query-understanding branch April 22, 2024 23:15
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