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: create tutorial for qa bot #3886

Merged
merged 14 commits into from
Nov 11, 2021
Merged

docs: create tutorial for qa bot #3886

merged 14 commits into from
Nov 11, 2021

Conversation

gvondulong
Copy link
Contributor

Adds a tutorial for a question answering bot that uses doc2query

@codecov
Copy link

codecov bot commented Nov 8, 2021

Codecov Report

Merging #3886 (c016f3e) into master (dd752ff) will increase coverage by 0.96%.
The diff coverage is n/a.

❗ Current head c016f3e differs from pull request most recent head 2113775. Consider uploading reports for the commit 2113775 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3886      +/-   ##
==========================================
+ Coverage   88.92%   89.88%   +0.96%     
==========================================
  Files         168      168              
  Lines       12221    12221              
==========================================
+ Hits        10867    10985     +118     
+ Misses       1354     1236     -118     
Flag Coverage Δ
daemon 44.11% <ø> (ø)
jina 88.34% <ø> (+2.47%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
jina/clients/base/grpc.py 70.21% <0.00%> (-14.90%) ⬇️
jina/peapods/runtimes/gateway/http/models.py 100.00% <0.00%> (+0.74%) ⬆️
jina/types/routing/table.py 94.06% <0.00%> (+0.84%) ⬆️
jina/peapods/stream/base.py 90.32% <0.00%> (+1.07%) ⬆️
jina/peapods/zmq/__init__.py 89.06% <0.00%> (+1.16%) ⬆️
jina/clients/base/__init__.py 92.75% <0.00%> (+1.44%) ⬆️
jina/helper.py 83.18% <0.00%> (+1.61%) ⬆️
jina/peapods/pods/compound.py 92.30% <0.00%> (+1.77%) ⬆️
jina/peapods/pods/k8s.py 81.26% <0.00%> (+1.90%) ⬆️
jina/importer.py 87.17% <0.00%> (+2.56%) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd752ff...2113775. Read the comment docs.

Copy link
Member

@mapleeit mapleeit left a comment

Choose a reason for hiding this comment

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

Marked some place which can use markdown syntax instead of html tag, such as <em> and </br>

docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
Copy link
Member

@JoanFM JoanFM left a comment

Choose a reason for hiding this comment

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

Looks good, just some minor comments

docs/tutorials/quesion-answering-bot.md Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
Copy link
Contributor

@cristianmtr cristianmtr left a comment

Choose a reason for hiding this comment

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

make sure to upper-case Jina all throughout (unless it's the source-code package jina)

docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Show resolved Hide resolved
Now let's move on to the last part and create the indexer.

## Putting it Together with the Indexer
The indexer is the only one of our `Executor`s that can handle more than one task.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you re-implement SimpleIndexer? It's already a published Executor on hub. It is really relevant to the DocsQA to delve into it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair point. However, I would like to keep it in here since it has a few little additions to it, that are specific to the DocQA. Would you be fine with that?

Copy link
Contributor

Choose a reason for hiding this comment

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

Which ones? Theoretically then, you should frame it as

  • I forked the (already excellent :P ) SimpleIndexer to add this feature I needed for my scenario
  • only show and discuss those LOCs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does the simple indexer sort the matches by similarity already?
If not, you're right. It would be super easy to use the indexer and simply grab the match with the largest similarity.
I'll change it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Me and Joan synced in the morning and decided to move forward without changing the indexer to use the hub. The consensus was to not spend more time on this, since the main purpose of this tutorial is to log the idea of using doc2query for a qa bot and to show how to use jina for it. Hope you are okay with this?!

docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
@mapleeit mapleeit self-requested a review November 10, 2021 02:56
mapleeit
mapleeit previously approved these changes Nov 10, 2021
@hanxiao
Copy link
Member

hanxiao commented Nov 10, 2021

i think you need to squash the commits to fix the commit message a bit.

Copy link
Member

@CatStark CatStark left a comment

Choose a reason for hiding this comment

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

Some style changes

docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
docs/tutorials/quesion-answering-bot.md Outdated Show resolved Hide resolved
gvondulong and others added 12 commits November 10, 2021 16:53
Co-authored-by: Zhaofeng Miao <522856232@qq.com>
Co-authored-by: Zhaofeng Miao <522856232@qq.com>
Co-authored-by: Zhaofeng Miao <522856232@qq.com>
Co-authored-by: Zhaofeng Miao <522856232@qq.com>
Co-authored-by: Zhaofeng Miao <522856232@qq.com>
Co-authored-by: Zhaofeng Miao <522856232@qq.com>
Co-authored-by: Zhaofeng Miao <522856232@qq.com>
Co-authored-by: Zhaofeng Miao <522856232@qq.com>
@JoanFM JoanFM requested a review from CatStark November 11, 2021 14:25
@JoanFM JoanFM merged commit 355343a into jina-ai:master Nov 11, 2021
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.

None yet

6 participants