Skip to content

How can I force Bedrock to read other fields when connecting to a Salesforce app

0

I created a Knowledge Base which connects to a Salesforce app. I decided to test it with using retrieval only, but noticed that it wasn't reading all of the available information. When I examined the source chunks, I would see that it would include certain keys (x-amz-bedrock-kb-urlName, x-amz-bedrock-kb-knowledgeArticleId). All of these fields correspond to a field I have in my Salesforce knowledge article. However, not every field in the Salesforce object has key in the Knowledge Base source chunk. I believe that, for some reason, Bedrock is not reading all of the available fields in Salesforce. I know that there are inclusion filters but those only apply to the titles of the articles and not the contents in them. Is there some way I can direct the Knowledge Base to include these other fields?

You can apply inclusion/exclusion filters on the following content types: ...

Knowledge__kav: Knowledge Article Title

1 Answer
1

When working with Amazon Bedrock Knowledge Bases and Salesforce data sources, there are limitations on how fields are processed. Currently, Amazon Bedrock Knowledge Bases supports only one content field, which is split into chunks and converted into vector embeddings. Other fields are treated as metadata and associated with each chunk.

For CSV files, you can control which fields are treated as metadata using inclusion/exclusion fields in a metadata.json file. However, for Salesforce connections specifically, it appears you're experiencing limitations on which fields are automatically included as metadata in your knowledge base.

To improve your data management and ensure more fields are available, you might consider:

  1. Using CSV files as an alternative data source format, where you can explicitly designate content fields and metadata fields using columns. This is considered a best practice for large datasets.

  2. Adding filters to document fields or attributes to improve the relevancy of responses. Your data sources can include document metadata attributes or fields to filter and specify the fields to embed.

  3. If you need to include specific fields from your Salesforce knowledge articles that aren't being automatically included, you might need to export that data to a CSV format first, where you have more control over field inclusion.

The metadata fields in your knowledge base are important as they can be used for filtering during retrieval, which can significantly improve the accuracy and relevance of your responses.
Sources
Include metadata in a data source to improve knowledge base query - Amazon Bedrock
Improve search results and accurate in Amazon Bedrock | AWS re:Post

answered 10 months ago

EXPERT

reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.