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

The CustomerSupport example is not working #91

Open
warappa opened this issue Nov 19, 2024 · 0 comments
Open

The CustomerSupport example is not working #91

warappa opened this issue Nov 19, 2024 · 0 comments

Comments

@warappa
Copy link

warappa commented Nov 19, 2024

At least with Ollama ("llama3.1" or "llama3.2"), the CustomerSupport sample is not working.

The summary works, but the issues is in the chat prompt. There is string.Join("\n", searchResults) in the prompt. The searchResults are ManualChunks. ToString of ManualChunk returns just "ManualChunk", so there is no real context.

So the message to be passed to CompleteAsync ends up being:

Using the following data sources as context, answer the user query: Summary?

## Context
ManualChunk
ManualChunk
ManualChunk
ManualChunk
ManualChunk

Response: 

Which amounts to no real context for the LLM (the LLM complains even that it only sees some "ManualChunk" texts as context).

Code

// RAG loop
// [1] Search for relevant documents
var searchResults = await productManualSearchService.SearchAsync(ticket.ProductId.Value, query);
// [2] Augment prompt with search results
var message = $"""
Using the following data sources as context, answer the user query: {query}
## Context
{String.Join("\n", searchResults)}
Response:
""";
// [3] Generate response
var response = await chatClient.CompleteAsync(message);

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

No branches or pull requests

1 participant