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

.Net: ADR for RAG pattern in SK #4771

Merged
merged 13 commits into from
Feb 9, 2024
Merged

Conversation

dmytrostruk
Copy link
Member

@dmytrostruk dmytrostruk commented Jan 28, 2024

Resolves: #4578
Resolves: #3455

  1. Added ADR which describes different approaches how to use RAG pattern in current version of Semantic Kernel and a couple of new possible approaches, which could be added in the future.
  2. Added examples how to use RAG pattern with ChatGPT Retrieval Plugin, TextMemoryPlugin and custom plugin.
  3. Small fixes to TextMemoryPlugin.

@dmytrostruk dmytrostruk self-assigned this Jan 28, 2024
@shawncal shawncal added .NET Issue or Pull requests regarding .NET code documentation labels Jan 28, 2024
@dmytrostruk dmytrostruk marked this pull request as ready for review January 30, 2024 21:40
@dmytrostruk dmytrostruk requested a review from a team as a code owner January 30, 2024 21:40
@dmytrostruk dmytrostruk changed the title .Net: [Draft] ADR for RAG pattern in SK .Net: ADR for RAG pattern in SK Jan 30, 2024
@dmytrostruk dmytrostruk added the PR: ready for review All feedback addressed, ready for reviews label Jan 30, 2024
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

Great write-up, posted some comments/thoughts below.

docs/decisions/0033-rag-in-sk.md Outdated Show resolved Hide resolved
docs/decisions/0033-rag-in-sk.md Outdated Show resolved Hide resolved
docs/decisions/0033-rag-in-sk.md Outdated Show resolved Hide resolved
docs/decisions/0033-rag-in-sk.md Outdated Show resolved Hide resolved
docs/decisions/0033-rag-in-sk.md Outdated Show resolved Hide resolved
docs/decisions/0033-rag-in-sk.md Outdated Show resolved Hide resolved
@stephentoub
Copy link
Member

Otherwise, I think it's not a bad story to have the abstraction as a way to get up and running really quickly - without having to mess around with a custom plugin and understanding the specific vector DB's SDK; then, as new requirements come in, some users may "graduate" out of that story to interact directly with the vector DB, if they really need to.

I agree. There's significant value to having the abstraction, and we'd be doing folks a disservice by getting rid of it even if you can't do everything with it. You can do a lot with it (and we should ensure it's as good / full-featured as possible), including bootstrapping / getting up and running, and in a way that lets you postpone choice, i.e. you can write code without committing to a specific db, you can experiment, you can get your feet under you, and then if you later find you need to go beyond what the abstraction offers, you can break glass and use direct functionality on a specific db you commit to at that point.

@dmytrostruk
Copy link
Member Author

@roji @stephentoub Thank you for feedback, it's very helpful! We will take it into account when deciding on next steps.

@dmytrostruk dmytrostruk added this pull request to the merge queue Feb 9, 2024
Merged via the queue into microsoft:main with commit 08e2ed3 Feb 9, 2024
18 checks passed
@dmytrostruk dmytrostruk deleted the rag-pattern branch February 9, 2024 17:26
eavanvalkenburg pushed a commit to eavanvalkenburg/semantic-kernel that referenced this pull request Feb 12, 2024
Resolves: microsoft#4578
Resolves: microsoft#3455

1. Added ADR which describes different approaches how to use RAG pattern
in current version of Semantic Kernel and a couple of new possible
approaches, which could be added in the future.
2. Added examples how to use RAG pattern with ChatGPT Retrieval Plugin,
TextMemoryPlugin and custom plugin.
3. Small fixes to TextMemoryPlugin.

---------

Co-authored-by: Shay Rojansky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation .NET Issue or Pull requests regarding .NET code PR: ready for review All feedback addressed, ready for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.Net: ADR for Semantic Kernel Memory Strategy .Net: Integrate ChatGPT's retrieval plugin capabilities in SK
8 participants