-
Notifications
You must be signed in to change notification settings - Fork 33
Add the Content Summarization Experiment base #136
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
base: develop
Are you sure you want to change the base?
Add the Content Summarization Experiment base #136
Conversation
…not set' instead of an empty string if something isn't set, like the title or slug. Seems to give better results that way
…ty values in our helper function
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @prabinjha. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #136 +/- ##
=============================================
+ Coverage 46.89% 48.75% +1.86%
- Complexity 208 235 +27
=============================================
Files 19 22 +3
Lines 1271 1403 +132
=============================================
+ Hits 596 684 +88
- Misses 675 719 +44
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JasonTheAdams
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, @dkotter! Left a few thoughts!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should clarify the data structure for the model to expect, and make it clear that the content is being summarized, while the context should be considered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I've pulled the content out of the context now so those are more obviously separated: d186657
We'll also likely want to make this same change for the Title Generation Experiment but I can do that in a separate PR
…s that to our system instructions
…re in our prompt, making it clearer to the LLM what it should be summarizing
…ur request if it isn't empty. Change slightly how we separate content from context
…:dkotter/ai into feature/content-summarization-experiment
What?
Partially closes #12
Adds the base Experiment and Ability code for Content Summarization. There will be a followup PR that adds in the UI to trigger summarization at the post level.
Why?
We want an Experiment that allows you to summarize content and then store that summary as post meta and optionally insert it as a block (both of those pending in the followup PR). To keep PRs as small as possible, this introduces the base framework for content summarization, both the Experiment and the Ability.
How?
get_post_contexthelper function to remove empty valuesTesting Instructions
Since there isn't a UI for this yet, will need to make direct API requests to see this working.
Make an authenticated
GETrequest to the main abilities endpoint and ensure the Summarization ability shows thereMake an authenticated
GETrequest to the Summarization endpoint and ensure information about the ability showsMake an authenticated
POSTrequest to the Summarization run endpoint without passing valid data and ensure an error showsMake an authenticated
POSTrequest to the Summarization run endpoint and pass in a post ID and ensure a summary is returnedMake an authenticated
POSTrequest to the Summarization run endpoint and pass in a non valid post ID and ensure an error is returnedMake an authenticated
POSTrequest to the Summarization run endpoint and pass in content and ensure a summary is returnedTest using WordPress Playground
The changes in this pull request can be previewed and tested using this WordPress Playground instance:
Click here to test this pull request.