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

docs: update final section of the rag haystack blog post #4294

Conversation

sdiazlor
Copy link
Contributor

Description

Updating the last part, to showcase how to use both fine-tuned models in Haystack.

Trim long headers:
image

Closes #4259

Type of change

(Remember to title the PR according to the type of change)

  • Documentation update

How Has This Been Tested

(Please describe the tests that you ran to verify your changes.)

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • My changes generate no new warnings
  • I filled out the contributor form (see text above)
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@sdiazlor sdiazlor linked an issue Nov 21, 2023 that may be closed by this pull request
@sdiazlor sdiazlor self-assigned this Nov 21, 2023
@davidberenstein1957
Copy link
Member

Lovely @sdiazlor

" fields=[TextField(name='query', title='Query', required=True, type='text', use_markdown=False), TextField(name='retrieved_document_1', title='Retrieved Document 1', required=True, type='text', use_markdown=False), TextField(name='retrieved_document_2', title='Retrieved Document 2', required=False, type='text', use_markdown=False), TextField(name='retrieved_document_3', title='Retrieved Document 3', required=False, type='text', use_markdown=False)]\n",
" questions=[RatingQuestion(name='question_rating_1', title='Rate the relevance of the user question1', description='Rate the relevance of the retrieved document.', required=True, type='rating', values=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), RatingQuestion(name='question_rating_2', title='Rate the relevance of the user question2', description='Rate the relevance of the retrieved document.', required=False, type='rating', values=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), RatingQuestion(name='question_rating_3', title='Rate the relevance of the user question3', description='Rate the relevance of the retrieved document.', required=False, type='rating', values=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), TextQuestion(name='response', title='Write a helpful, harmless, accurate response to the query.', description='Write the response to the query.', required=False, type='text', use_markdown=False)]\n",
" guidelines=This is a retrieval augmented generation dataset that contains queries and retrieved documents. Please rate the relevancy of retrieved document and write the response to the query in the response field.)\n",
" fields=[TextField(name='query', title='Query', required=True, type='text', use_markdown=False), TextField(name='retrieved_document_1', title='Retrieved Document 1', required=True, type='text', use_markdown=False), TextField(name='retrieved_document_2', title='Retrieved Document 2', required=False, type='text', use_markdown=False), TextField(name='retrieved_document_3', title='Retrieved Document 3', required=False, type='text', use_markdown=False)]\n",

Choose a reason for hiding this comment

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

can't we use the task templates here?

" fields=[TextField(name='sentence1', title='Sentence1', required=True, type='text', use_markdown=True), TextField(name='sentence2', title='Sentence2', required=True, type='text', use_markdown=True)]\n",
" questions=[RatingQuestion(name='similarity', title='Similarity', description='Rate the similarity between the two sentences.', required=True, type='rating', values=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10])]\n",
" guidelines=This is a sentence similarity dataset that contains two sentences. Please rate the similarity between the two sentences.)\n",
" fields=[TextField(name='sentence-1', title='Sentence-1', required=True, type='text', use_markdown=True), TextField(name='sentence-2', title='Sentence-2', required=True, type='text', use_markdown=True)]\n",

Choose a reason for hiding this comment

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

and a task template here?

{
"data": {
"text/plain": [
"FeedbackDataset(\n",

Choose a reason for hiding this comment

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

and a task template her?

@sdiazlor
Copy link
Contributor Author

sdiazlor commented Nov 21, 2023

@davidberenstein1957 in fact you made me realize that one template was duplicated, but for the other cases (for sentence similarity and for rag), in both I'm using TaskTemplates. I think you misunderstood with the output.
image
image

@davidberenstein1957
Copy link
Member

@sdiazlor, you are right. I was looking at the cell output instead of the actual notebook and I got confused.

@davidberenstein1957 davidberenstein1957 merged commit 7bcebe4 into develop Nov 21, 2023
13 checks passed
@davidberenstein1957 davidberenstein1957 deleted the docs/4259-docs-update-final-section-of-the-rag-haystack-blog-post branch November 21, 2023 15:18
leiyre pushed a commit that referenced this pull request Nov 29, 2023
* develop: (30 commits)
  chore: increase dev version release to 1.21.0
  fix: responses and suggestions filter QA (#4337)
  feat: delete suggestion from record on search engine (#4336)
  feat: update suggestion from record on search engine (#4339)
  bug: fix bug and update test (#4341)
  fix: preserve `TextClassificationSettings.label_schema` order (#4332)
  Update issue templates
  feat: 🚀 support for filtering and sorting by responses and suggestions (#4160)
  fix: handling errors for non-existing endpoints (#4325)
  feat: adding utils module and functions (#4121)
  Update labels in github workflows (#4315)
  fix: correct unification implementation for `RankingQuestionStrategy` (#4295)
  fix: update to solve the error of integration tests in CI (#4314)
  docs: revisit install process (#4261)
  feat: increase timeout minutes for python tests (#4307)
  docs: docs export dataset does not apply coloring for code snippets (#4296)
  docs: update final section of the rag haystack blog post (#4294)
  feat: add multi_modal templates and update vector setting (#4283)
  feat: better logging bar for FeedbackDataset (#4267)
  refactor: ArgillaTrainer for unified variable usage (#4214)
  ...

# Conflicts:
#	frontend/v1/infrastructure/repositories/RecordRepository.ts
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.

[DOCS] Update final section of the rag-haystack blog post
2 participants