Go to file
Rafael dos Santos Silva 5e3f4e1b78
FEATURE: Embeddings to main db (#99)
* FEATURE: Embeddings to main db

This commit moves our embeddings store from an external configurable PostgreSQL
instance back into the main database. This is done to simplify the setup.

There is a migration that will try to import the external embeddings into
the main DB if it is configured and there are rows.

It removes support from embeddings models that aren't all_mpnet_base_v2 or OpenAI
text_embedding_ada_002. However it will now be easier to add new models.

It also now takes into account:
  - topic title
  - topic category
  - topic tags
  - replies (as much as the model allows)

We introduce an interface so we can eventually support multiple strategies
for handling long topics.

This PR severely damages the semantic search performance, but this is a
temporary until we can get adapt HyDE to make semantic search use the same
embeddings we have for semantic related with good performance.

Here we also have some ground work to add post level embeddings, but this
will be added in a future PR.

Please note that this PR will also block Discourse from booting / updating if 
this plugin is installed and the pgvector extension isn't available on the 
PostgreSQL instance Discourse uses.
2023-07-13 12:41:36 -03:00
.github/workflows Initial commit 2023-02-17 11:33:47 -03:00
app FEATURE: Embeddings to main db (#99) 2023-07-13 12:41:36 -03:00
assets DEV: Remove the summarization feature (#83) 2023-06-13 14:32:26 -03:00
config FEATURE: Embeddings to main db (#99) 2023-07-13 12:41:36 -03:00
db FEATURE: Embeddings to main db (#99) 2023-07-13 12:41:36 -03:00
lib FEATURE: Embeddings to main db (#99) 2023-07-13 12:41:36 -03:00
spec FEATURE: Embeddings to main db (#99) 2023-07-13 12:41:36 -03:00
svg-icons UX: add a custom sparkles icon for AI action buttons (#44) 2023-04-20 20:41:24 +05:30
test/javascripts Initial commit 2023-02-17 11:33:47 -03:00
tokenizers FEATURE: Embeddings to main db (#99) 2023-07-13 12:41:36 -03:00
.discourse-compatibility DEV: Resolve add_to_serializer deprecations (#46) 2023-04-24 16:07:17 +01:00
.eslintrc Initial commit 2023-02-17 11:33:47 -03:00
.gitignore Initial commit 2023-02-17 11:33:47 -03:00
.prettierrc Initial commit 2023-02-17 11:33:47 -03:00
.rubocop.yml Initial commit 2023-02-17 11:33:47 -03:00
.streerc Initial commit 2023-02-17 11:33:47 -03:00
.template-lintrc.js Initial commit 2023-02-17 11:33:47 -03:00
Gemfile Initial commit 2023-02-17 11:33:47 -03:00
Gemfile.lock Initial commit 2023-02-17 11:33:47 -03:00
LICENSE Initial commit 2023-02-17 11:33:47 -03:00
README.md Initial commit 2023-02-17 11:33:47 -03:00
package.json Initial commit 2023-02-17 11:33:47 -03:00
plugin.rb FEATURE: Embeddings to main db (#99) 2023-07-13 12:41:36 -03:00
yarn.lock Build(deps): Bump semver from 6.3.0 to 6.3.1 (#102) 2023-07-13 09:33:34 +02:00

README.md

Plugin Name Plugin

Plugin Summary

For more information, please see: url to meta topic