Add samples/cs/rag/rag - #930
Open
Philippe-Laval wants to merge 12 commits into
Open
Conversation
For model that are thinking, they need more toen to output the result
Path.Combine(AppContext.BaseDirectory, "document.txt")
|
@Philippe-Laval-Qualiparc is attempting to deploy a commit to the MSFT-AIP Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an interactive C# retrieval-augmented generation sample and supporting sample updates.
Changes:
- Adds embedding-based document retrieval with grounded chat responses.
- Improves document summarizer defaults and sample content.
- Adds solution files and updates package/token settings.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
samples/cs/verify-winml/VerifyWinML.slnx |
Adds the WinML solution file. |
samples/cs/verify-winml/Program.cs |
Increases the completion token limit. |
samples/cs/tutorial-document-summarizer/TutorialDocumentSummarizer.csproj |
Copies the default document to output. |
samples/cs/tutorial-document-summarizer/Program.cs |
Adds prompt alternatives and resolves the default document path. |
samples/cs/tutorial-document-summarizer/document.txt |
Adds a sample document. |
samples/cs/rag/rag/rag.csproj |
Defines the RAG sample project. |
samples/cs/rag/rag/Program.cs |
Implements interactive retrieval and grounded generation. |
samples/cs/rag/rag.slnx |
Adds the RAG solution file. |
samples/cs/embeddings/Embeddings.slnx |
Adds the embeddings solution file. |
samples/cs/Directory.Packages.props |
Pins the Foundry Local package version. |
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <PackageVersion Include="Microsoft.AI.Foundry.Local" Version="*-*" /> | ||
| <PackageVersion Include="Microsoft.AI.Foundry.Local" Version="1.0.0" /> |
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net10.0</TargetFramework> |
Comment on lines
+63
to
+65
| var systemPrompt2 = | ||
| "Summarize the following document in a single, concise paragraph. " + | ||
| "Capture the main argument and supporting points."; |
Comment on lines
+188
to
+189
| norm_a = (float)Math.Sqrt(norm_a); | ||
| norm_b = (float)Math.Sqrt(norm_b); |
| { | ||
| Console.WriteLine("Question:"); | ||
| var query = Console.ReadLine()?.Trim(); | ||
| if (string.IsNullOrEmpty(query) || query.ToLower() == "quit") |
Author
|
fix some problem reported |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the equivalent of ^python example found in the doc.