Go to file
Sam 316ea9624e
FIX: properly truncate !command prompts (#227)
* FIX: properly truncate !command prompts

### What is going on here?

Previous to this change where a command was issued by the LLM it
could hallucinate a continuation eg:

```
This is what tags are

!tags

some nonsense here
```

This change introduces safeguards so `some nonsense here` does not
creep in to the prompt history, poisoning the llm results

This in effect grounds the llm a lot better and results in the llm
forgetting less about results.

The change only impacts Claude at the moment, but will also improve
stuff for llama 2 in future.

Also, this makes it significantly easier to test the bot framework
without an llm cause we avoid a whole bunch of complex stubbing

* blank is not a valid bot response, do not inject into prompt
2023-09-15 07:02:37 +10:00
.github/workflows Initial commit 2023-02-17 11:33:47 -03:00
app FEATURE: AI Helper endpoint to generate a thumbnail from text. (#224) 2023-09-14 12:53:44 -03:00
assets FIX: Conditionally render AI suggestion buttons (#225) 2023-09-13 14:18:48 -07:00
config FEATURE: AI Helper endpoint to generate a thumbnail from text. (#224) 2023-09-14 12:53:44 -03:00
db FIX: Update migrations with latest vector rep changes (#199) 2023-09-05 14:31:04 -03:00
lib FIX: properly truncate !command prompts (#227) 2023-09-15 07:02:37 +10:00
spec FIX: properly truncate !command prompts (#227) 2023-09-15 07:02:37 +10: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: Support for locally infered embeddings in 100 languages (#115) 2023-07-27 15:50:03 -03:00
.discourse-compatibility DEV: Pin plugin for Discourse 3.1 stable (#143) 2023-08-21 14:46:54 -03: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 CHORE: Update Readme (#185) 2023-09-04 15:46:35 -03:00
package.json DEV: Update ESLint config version (#166) 2023-08-28 12:21:52 -07:00
plugin.rb FEATURE: HyDE-powered semantic search. (#136) 2023-09-05 11:08:23 -03:00
translator.yml DEV: Add Crowdin support (#108) 2023-07-15 00:56:15 +02:00
yarn.lock DEV: Update ESLint config version (#166) 2023-08-28 12:21:52 -07:00

README.md

Discourse AI Plugin

Plugin Summary

For more information, please see: https://meta.discourse.org/t/discourse-ai/259214?u=falco