Read attachments (in JSON or DOC formats) from Knowledge Articles in NASK

varunagarwal83
Tera Contributor

Requirement:
One of our key requirements is to read attachments (in JSON or DOC formats) from Knowledge Articles and generate responses for users on the basis of the content in the attachments in Now Assist skill.

 

We are currently using the following prompt structure:

"Based on the knowledge article attachments {{knowledge.direct}}, generate a summary that includes both the main content and any critical insights from the attached documents. Provide the result based on the user query {{strinput}}."

 

Question:
Can someone help clarify how to access Knowledge Article attachments within a Now Assist prompt? We want to ensure that the AI can effectively read and interpret the attached documents to generate accurate responses to user queries.

2 REPLIES 2

Mghase
Tera Contributor
As far as I know, NASK allows you to process the text but not the attachments directly. If you need to process the text from attachments, you might need to:
  1. Have an input mechanism that accepts the IDs of the files you need to access.
  2. Use a subflow tool, "filecontents", which takes these file IDs and returns the content of the files. You can utilize services such as Azure Document Intelligence or other similar tools to read the file contents.
  3. Once you have the content of the file(s), your prompt could be: "Based on the knowledge article attachments {{filecontents.output}}, generate a summary that includes both the main content and any critical insights from the attached documents. Provide the result based on the user query {{strinput}}."

 

 

anubhavkapoor76
ServiceNow Employee
ServiceNow Employee

@varunagarwal83 - Please have a look at the below OOB AI Agent under NA for Doc Intelligence and you will get ideas for your prompts

anubhavkapoor76_0-1749749951389.png