Skip to main content

#Knowledge Base3 personnes en discutent

I'm working with a multi-agent Agentforce setup (AgentScript / GenAiPlannerBundle) and I'm trying to guarantee that a subagent always grounds its answers in the knowledge base instead of answering from the model's own memory.

The subagent exposes a knowledge action as a tool:

 

 

AnswerQuestionsWithKnowledge:

target: "standardInvocableAction://streamKnowledgeSearch"

source: "EmployeeCopilot__AnswerQuestionsWithKnowledge"

Today it's only listed under reasoning.actions, and the instructions tell the LLM to always call it first ("never answer without calling the knowledge action"). The problem: the call is enforced only through instruction text, so the LLM skips it intermittently and answers from memory. The trace confirms the tool is in tools_sent but there's no tool_invocation on those turns.

To make the call unconditional, I tried moving it into before_reasoning:

 

 

before_reasoning:

run @actions.AnswerQuestionsWithKnowledge

with query = @system_variables.user_input

with citationsUrl = @knowledge.citations_url

with ragFeatureConfigId = @knowledge.rag_feature_config_id

with citationsEnabled = @knowledge.citations_enabled

Two issues:

  1. The Builder saves without any syntax error, but at runtime the agent replies with a generic "unexpected error" and nothing shows up in the trace for that action. If I remove the before_reasoning block, everything works again.
  2. @system_variables.user_input is rejected with a "does not exist" error in my org (even though it's in the current docs), so I'm not sure I'm referencing the user's latest message correctly.

Questions:

  1. Can a streaming standardInvocableAction like streamKnowledgeSearch actually be executed deterministically with run inside before_reasoning, or is that action type restricted to reasoning.actions (tool) usage only? I suspect the streaming nature may be the blocker.
  2. Is there a non-streaming knowledge/RAG action recommended for deterministic execution in before_reasoning/after_reasoning?
  3. What's the correct token for the user's latest utterance if @system_variables.user_input isn't available in my org's AgentScript version?

Has anyone successfully forced a knowledge search to run before reasoning? Any working pattern is appreciated.

Thanks! 

 

#Agentforce  #Knowledge Base

1 réponse
  1. 30 sept., 06:54

    Hi @Rodrigo Sanchez

     

     

    I think your overall approach is correct, but the issue may be with streamKnowledgeSearch itself.

    1. before_reasoning can run actions deterministically, so using run there is a valid pattern.
    2. In your case, AnswerQuestionsWithKnowledge uses:

    standardInvocableAction://streamKnowledgeSearch 

     

    Because this is a streaming action, it looks like it may not work properly when called directly from before_reasoning. The fact that it saves successfully but fails only at runtime also points in that direction. 

     

    1. I could not find clear Salesforce documentation saying that streamKnowledgeSearch is supported inside before_reasoning, so I would avoid assuming it is supported there.
    2. For the user message, the current documented variable is:

    @system_variables.user_input

    If your org says this variable does not exist, it could be related to the AgentScript version or feature rollout in that org. 

     

    For now, I would keep the Knowledge action under reasoning.actions and make the instructions as strict as possible. 

     

    If you really need the Knowledge search to run every time before reasoning, I would raise a Salesforce Support case and specifically ask whether streamKnowledgeSearch supports deterministic execution inside before_reasoning. 

     

    The interesting part here is that the script passes validation but fails only at runtime, so it may be a current platform limitation rather than an issue with your syntax. 

     

    Thank you, 

    Venkat Yadav.

0/9000
Sanda Isakovic a publié du contenu dans #Knowledge Articles

I am curious how everyone is using the Knowledge Base within their organizations. Do you have any guidelines you can share in terms of what content you recommended to be created into Knowledge Articles v. what should not be one? Would love to hear recommendations from others on this topic. 

 

#Knowledge Articles  #Knowledge Base

0/9000
Federica C. a publié du contenu dans #Forums Community

Hello everyone, 

 

I'd like to share my LinkedIn newsletter focused on innovative editorial solutions for the  #Knowledge Base in multilingual business models. I'd love to hear from those of you who use the application.  

 

Check out Salesforce Knowledge Unpacked and feel free to share your thoughts or questions in the comments.  

 

I look forward to hearing from you! 

 

 

 

#Forums Community

0/9000

[▶️]🔴🔥🎬 New Salesforce Summer 25 Lightning Knowledge Features You Need To See!

In this video, I am sharing all the new Lightning Knowledge enhancements that came up with Summer 25 release.

In this video, I have covered:

🌟 - Getting Feedback to Improve Knowledge Base

🌟 - Improve Article Navigation with Table of Contents

https://youtu.be/_busw7qXrzs

 

 

@The Blog Group @* Release Readiness Trailblazers *

   

[▶️]🔴🔥🎬 New Salesforce Summer 25 Lightning Knowledge Features You Need To See!In this video, I am sharing all the new Lightning Knowledge enhancements that came up with Summer 25 release.

 

 

 

#Salesforce Developer  #Salesforce Admin  #Knowledge Article  #Knowledge Base  #Knowledge Management  #New Releases  #Release Readiness  #Service Cloud

4 commentaires
  1. 2 juin 2025, 16:57

    Thank you @B Super - Chupka for the comment. Welcome back. I really appreciate your feedback and going forward will incorporate those in my next videos. 

0/9000

Calling all Service Cloud practitioners: this webinar is for you!  

  

Please join us 🗓️ May 6th 9:00 AM PT / 12:00 PM ET  

If you need one more reason to build your knowledge base, scaling it's benefits through Agentforce is it.  Join @Zachary Stauber and @Hirak Vora as they cover best practices and tips related to setting up and managing a knowledge base, including functionality relevant to Service Cloud Knowledge and helping improve Agentforce’s use of the #Knowledge Base.

0/9000

Calling all Service Cloud practitioners: this webinar is for you!  

  

Please join us 🗓️ May 6th 9:00 AM PT / 12:00 PM ET  

If you need one more reason to build your knowledge base, scaling it's benefits through Agentforce is it.  Join @Zachary Stauber and @Hirak Vora as they cover best practices and tips related to setting up and managing a knowledge base, including functionality relevant to Service Cloud Knowledge and helping improve Agentforce’s use of the #Knowledge Base.

0/9000

Calling all Service Cloud practitioners: this webinar is for you!  

  

Please join us 🗓️ May 6th 9:00 AM PT / 12:00 PM ET  

If you need one more reason to build your knowledge base, scaling it's benefits through Agentforce is it.  Join @Zachary Stauber and @Hirak Vora as they cover best practices and tips related to setting up and managing a knowledge base, including functionality relevant to Service Cloud Knowledge and helping improve Agentforce’s use of the #Knowledge Base

0/9000

Calling all Service Cloud practitioners: this webinar is for you!  

  

Please join us 🗓️ May 6th 9:00 AM PT / 12:00 PM ET  

If you need one more reason to build your knowledge base, scaling it's benefits through Agentforce is it.  Join @Zachary Stauber and @Hirak Vora as they cover best practices and tips related to setting up and managing a knowledge base, including functionality relevant to Service Cloud Knowledge and helping improve Agentforce’s use of the #Knowledge Base

0/9000

Surely not the only one struggling with this? I am only starting the conversation a new since the last related question was in 2021 with no solution in sight. I am having the same result every time I try to Import a Knowledge Article in a .zip from Setup: "An unexpected failure during loading has caused the import to stop.". Following every step from the official help materials and from this: YouTube tutorial

. I only wish that they have showed us the final result, but I believe that they got to the same place I am getting :0). I would appreciate highly any tips on resolving this. 

 

#Data Management  #Knowledge Base  #Knowledge Article  #Knowledge Management

0/9000

Hello! 

I would love to hear tips on how you manage your knowledge base. We want to be able to run an audit easily check a box indicating which articles need to be updated, but with the knowledge fields requiring editing as a new version and later republishing in order to just check a box, it doesn't feel like a practical way to do it. I look forward to hearing your tips!

3 commentaires
  1. 19 mai 2023, 04:40

    @Brooke Bracy

    at my place we have a search engine in place. using that and SF data points we measure: 

     

    was a KB linked to a case? < data point is in SF

    was a KB view on our support portal < data point in our search engine. 

     

    we then apply the following rule: if a KB was NOT linked or view on portal the last 12 months: we have a report that flags it for review: is the KB relevant? can it be archived? next we have a set of criterias we follow. 

     

    I hope this helps

    Eric

0/9000