web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Custom Data Source(Jso...
Copilot Studio
Unanswered

Custom Data Source(JsonData) in Generative Answers

(0) ShareShare
ReportReport
Posted on by 4

Hi all/@HenryJammes,

 

I tried to generate 'Generative answers' using my custom data (json) in the following format. But it doesn't seem to be generating the generative answer. Instead, I get blank results. 

 

JSON data

[{“Content”:“Your order is Delivered. You have ordered 2 items. It was picked on 2023-12-12T18:37:49. It is expected to be delivered on 2023-12-17T23:59:59, with COD amount 850”,

“ContentLocation”:“https://www.xyz.com”}]

 

Initially, sometimes I used to get the desired output. But completely stopped generating from last 2 days.

Is there any usage limits?

 

sureshbabus_0-1703576922505.png

 

Please help.

 

I have the same question (0)
  • sureshbabus Profile Picture
    4 on at

    Hi All/@HenryJammes,

     

    I found that the search parameter I used to create the custom data source was not present inside it. After embedding the value of the search parameter that I receive from the user into the custom data source, I could produce generative answers. I tested this with some data and found working. Planning to run more test cases and update this thread. 

    In the meantime if @HenryJammes or anybody else could confirm this? Thanks.

  • adilei Profile Picture
    on at

    What do you mean exactly by embedding the search parameter? Can you share examples for the two payloads (with and without the param)?

  • sureshbabus Profile Picture
    4 on at

    Hi adilei,

     

    I replied to you twice with search sample data in this message thread. But it is not being displayed under this post. I included sample data in JSON format. Does it create an issue?

  • adilei Profile Picture
    on at

    Not sure, but you can try uploading the payload to Gist or something similar and share the URL 

  • CatarinaFranco Profile Picture
    14 on at

    Hello @sureshbabus , did you manage to solve the problem?

     

    I am having the same issue when trying to create a generative answer with a custom data source. 

    I parsed my string into JSON, and formatted the data to look like this:

     

    [ { "Content": "Establish a robust subcontracting management framework" }, { "Content": "Improve our Project Management practices and competences" }]

     

    But when I added this custom data source in the generative answer, and ask copilot for this information, the chat responds with a SystemError and the flow ends in GenerativeAnswer step. I don't know how to "debug" the problem. 

     

    @adilei can you help ? do you have any suggestion? 

     

    Thank you,

    Catarina Franco

  • adilei Profile Picture
    on at

    Can you share the YAML for your topic?

  • CatarinaFranco Profile Picture
    14 on at

    here it is:

  • adilei Profile Picture
    on at

    There's no way I'll be able to do anything about the YAML in your PDF doc, but my bad for not being more specific about a format 🙂

     

    Anyway, there's nothing wrong with your payload when fed directly into a Gen Answers node:

     

    [ { "Content": "Establish a robust subcontracting management framework" }, { "Content": "Improve our Project Management practices and competences" }]

     

    Here is my topic:

     

    kind: AdaptiveDialog
    beginDialog:
     kind: OnRecognizedIntent
     id: main
     intent:
     triggerQueries:
     - Gen Answers
    
     actions:
     - kind: Question
     id: question_jqu1IC
     interruptionPolicy:
     allowInterruption: true
    
     variable: init:Topic.userQuestion
     prompt: What's your question?
     entity: StringPrebuiltEntity
    
     - kind: SearchAndSummarizeContent
     id: searchAndSummarizeContent_yOOKKb
     userInput: =Topic.userQuestion
     additionalInstructions:
     publicDataSource: {}
     sharePointSearchDataSource: {}
     customDataSource:
     searchResults: "=[ { Content: \"Establish a robust subcontracting management framework\" }, { Content: \"Improve our Project Management practices and competences\" }]"

     

    The result:

    adilei_0-1706876344377.png

     

    If your topic ends up providing the same payload to the Gen Answers node, there's no reason it should not work.

  • CatarinaFranco Profile Picture
    14 on at

    @adilei sorry, I can send it again, if it helps. 

    kind: AdaptiveDialog
    beginDialog:
     kind: OnRecognizedIntent
     id: main
     intent:
     triggerQueries:
     - okr
     - kpi
     - goals
     - okrs
     - annual okrs
     - okrs 2024
    
     actions:
     - kind: InvokeFlowAction
     id: invokeFlowAction_M96xhe
     input: {}
     output:
     binding:
     2024OKR: Topic._2024OKR
    
     flowId: 2c8262c2-21c1-ee11-9079-0022489da1af
    
     - kind: ParseValue
     id: nWDkwE
     variable: Topic.PA_2024_OKRs
     valueType:
     kind: Table
     properties:
     {FilenameWithExtension}: String
     {FullPath}: String
     {Identifier}: String
     {IsFolder}: Boolean
     {Link}: String
     {Name}: String
     {Path}: String
     {Thumbnail}:
     type:
     kind: Record
     properties:
     Large: Blank
     Medium: Blank
     Small: Blank
    
     {VersionNumber}: String
     AssignedTo0:
     type:
     kind: Table
     properties:
     Claims: String
     Department: String
     DisplayName: String
     Email: String
     JobTitle: String
     Picture: String
    
     AssignedTo0@odata.type: String
     "AssignedTo0#Claims":
     type:
     kind: Table
     properties:
     Value: String
    
     "AssignedTo0#Claims@odata.type": String
     Author:
     type:
     kind: Record
     properties:
     Claims: String
     Department: String
     DisplayName: String
     Email: String
     JobTitle: String
     Picture: String
    
     "Author#Claims": String
     Created: String
     DueDate: String
     Editor:
     type:
     kind: Record
     properties:
     Claims: String
     Department: String
     DisplayName: String
     Email: String
     JobTitle: String
     Picture: String
    
     "Editor#Claims": String
     ID: Number
     ItemInternalId: String
     KeyResult: String
     LeadContributor:
     type:
     kind: Record
     properties:
     Id: Number
     Value: String
    
     "LeadContributor#Id": Number
     Modified: String
     Notes: String
     OKRLevel:
     type:
     kind: Table
     properties:
     Id: Number
     Value: String
    
     OKRLevel@odata.type: String
     "OKRLevel#Id":
     type:
     kind: Table
     properties:
     Value: Number
    
     "OKRLevel#Id@odata.type": String
     Owner:
     type:
     kind: Table
     properties:
     Id: Number
     Value: String
    
     Owner@odata.type: String
     "Owner#Id":
     type:
     kind: Table
     properties:
     Value: Number
    
     "Owner#Id@odata.type": String
     Progress:
     type:
     kind: Record
     properties:
     Id: Number
     Value: String
    
     "Progress#Id": Number
     StrategicGoal:
     type:
     kind: Record
     properties:
     Id: Number
     Value: String
    
     "StrategicGoal#Id": Number
     Title: String
    
     value: =Topic._2024OKR
    
     - kind: SendActivity
     id: sendActivity_bSwAxg
     activity: |-
     parsed data :: 
     {Topic.PA_2024_OKRs}
    
     - kind: SetVariable
     id: setVariable_xG7KlH
     variable: init:Topic.PA_2024_OKRs_Formatted
     value: |-
     =ForAll(Topic.PA_2024_OKRs,
     { 
     Content: Title & " - with key result " & KeyResult
     }
     )
    
     - kind: SendActivity
     id: sendActivity_XJlqCZ
     activity: |-
     Formatted OKRs ::
     {Topic.PA_2024_OKRs_Formatted}
    
     - kind: SearchAndSummarizeContent
     id: searchAndSummarizeContent_xwgZRC
     userInput: =System.Activity.Text
     variable: Topic.Answer
     additionalInstructions: talk in professional matter
     publicDataSource: {}
     sharePointSearchDataSource: {}
     customDataSource:
     searchResults: =Topic.PA_2024_OKRs_Formatted
    
     - kind: ConditionGroup
     id: conditionGroup_BOEnAn
     conditions:
     - id: conditionItem_EyMeLy
     condition: =!IsBlank(Topic.Answer)
    
     - kind: EndDialog
     id: aTVArJ

     

    I message the formatted variable before send it to generative answer, and it looks good. but the flow is ending in generative answer.
    Is there any way to understand why I am getting the error? any log with an adicional information?

    CatarinaFranco_1-1706877668360.png

     

  • adilei Profile Picture
    on at

    The topic looks okay - probably something in your payload. Maybe the Unicode codes? Try a simpler payload (like the one I tested) and work from there.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 251 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 201 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard