Skip to content

Add samples/cs/rag/rag - #930

Open
Philippe-Laval wants to merge 12 commits into
microsoft:mainfrom
Philippe-Laval:main
Open

Add samples/cs/rag/rag#930
Philippe-Laval wants to merge 12 commits into
microsoft:mainfrom
Philippe-Laval:main

Conversation

@Philippe-Laval

Copy link
Copy Markdown

Add the equivalent of ^python example found in the doc.

Copilot AI review requested due to automatic review settings July 30, 2026 18:46
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread samples/cs/Directory.Packages.props Outdated
</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 thread samples/cs/rag/rag/Program.cs Outdated
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")
@Philippe-Laval

Copy link
Copy Markdown
Author

fix some problem reported

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.

3 participants