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

feat: speed up ai search #9421

Merged
merged 1 commit into from
Feb 14, 2024
Merged

feat: speed up ai search #9421

merged 1 commit into from
Feb 14, 2024

Conversation

nickoferrall
Copy link
Contributor

@nickoferrall nickoferrall commented Feb 13, 2024

Fix #9340

GPT-3.5 turbo now has a large enough context window that it can accept the list of available templates.

I get similar results to GPT-4, and the response time is dramatically faster, so I think we should go with 3.5-turbo.

To test

  • Add the aiTemplate org feature flag
  • Ask the AI Search input questions like "what's a template that helps us celebrate small wins"
  • See that the results are similar to the results we get with the original search and that we no longer get timeouts

@nickoferrall nickoferrall added the Skip Maintainer Review Indicating the PR only requires reviewer review and can be merged right after it's approved label Feb 13, 2024
Copy link
Contributor

@igorlesnenko igorlesnenko left a comment

Choose a reason for hiding this comment

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

Works!

@@ -221,9 +221,11 @@ class OpenAIServerManager {
})

const templateResponse = (response.choices[0]?.message?.content?.trim() as string) ?? null
return JSON.parse(templateResponse) as AITemplateSuggestion
const parsedResponse = JSON5.parse(templateResponse)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, why replaced with JSON5?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

3.5-turbo doesn't have the JSON parse feature that GPT-4 has, so we need to parse it ourselves

@nickoferrall nickoferrall merged commit 9584170 into master Feb 14, 2024
6 checks passed
@nickoferrall nickoferrall deleted the feat/9340/speed-up-ai-search branch February 14, 2024 12:44
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
24 tasks
nickoferrall added a commit that referenced this pull request Feb 19, 2024
* chore: Add more Atlassian logging (#9405)

* chore: Add more Atlassian logging

Mainly associate the logs with the traces so it's possible to check
which GraphQL request caused a certain debug output.

* Less code shuffling

* Cleanup log directories

Put them in the dev folder so they're out of sight.

* fix: fix kudos in standups in nested lists (#9412)

* Fix: fix kudos in standups in nested lists

* fix test

* chore(release): release v7.15.2 (#9414)

Co-authored-by: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com>

* chore: update 3d secure card number in release_test.md (#9394)

Previous 3d secure card number does not work anymore and I don't see it in the stripe docs https://stripe.com/docs/testing?testing-method=card-numbers#regulatory-cards

* chore: bump node to v20.11.0 (#9410)

Signed-off-by: Matt Krick <matt.krick@gmail.com>

* chore: add embeddings table migration (#9372)

* chore: add embeddings table migration

* chore: code review changes

* feat: auto-add pgvector extension in production

Also:
   - fix: corrects types in standaloneMigrations.ts
   - fix: silly things I missed in the addEmbeddingTables migration

* fix: check for POSTGRES_USE_PGVECTOR

* fix: POSTGRES_USE_PGVECTOR strict check for === 'true'

* feat: speed up ai search (#9421)

* fix: not all jira projects are displayed in the list if there are a lot of them (#9422)

* chore(release): release v7.16.0 (#9419)

Co-authored-by: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com>

---------

Signed-off-by: Matt Krick <matt.krick@gmail.com>
Co-authored-by: Georg Bremer <github@dschoordsch.de>
Co-authored-by: Igor Lesnenko <igor.lesnenko@gmail.com>
Co-authored-by: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com>
Co-authored-by: Matt Krick <matt.krick@gmail.com>
Co-authored-by: Jordan Husney <jordan.husney@gmail.com>
Co-authored-by: Nick O'Ferrall <nickoferrall@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/s Skip Maintainer Review Indicating the PR only requires reviewer review and can be merged right after it's approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add subscription to AI Template Search
2 participants