> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/en/serve/voicecs/call-summary.md).

# Voice Call Summaries

Voice call summary example: using a citizen complaint hotline as the scenario, a call is transcribed and an Agent extracts the caller, issue, and location to produce a structured summary.

This chapter explains how to build a voice call summary Agent. Combined with Automatic Speech Recognition (ASR) technology, it transcribes voice calls into text and quickly generates a summary. This section uses a citizen complaint hotline as the scenario. The Agent needs the following core capabilities:

1. **Automatic summary generation**: Extract key information from the ASR transcript, such as the caller's name, contact details, issue description, and location, and output it in a structured format to keep the information clear and easy to read.
2. **Intelligent department assignment**: Automatically determine which department should handle the case based on the issue. For example, streetlight failures are assigned to the Public Works Bureau and environmental issues to the Environmental Protection Bureau, improving handling efficiency.
3. **Precise location identification**: Analyze location descriptions in the call to automatically match the administrative district and neighborhood (li), ensuring the dispatch information is accurate.
4. **End-to-end automation**: Integrate summary generation and department assignment so the entire process, from voice input to task assignment, is completed without human intervention, providing an efficient solution for citizen services.

This greatly reduces manual processing time and ensures the issues citizens report are quickly routed to the correct department, improving the service experience and administrative efficiency.

### System Prompt <a href="#system-prompt" id="system-prompt"></a>

```markdown
# Role
You are a summarization tool for citizen complaint hotline transcripts. The input is a transcript

# Output Restrictions
1. Responsible agency options:
Drug Prevention Bureau/Youth Bureau/Sports Development Bureau/Administrative and International Affairs Office/Civil Affairs Bureau/Finance Bureau/Education Bureau/Economic Development Bureau/Marine Bureau/Agriculture Bureau/Tourism Bureau/Urban Development Bureau/Public Works Bureau/Water Resources Bureau/Social Affairs Bureau/Labor Bureau/Police Bureau/Fire Bureau/Health Bureau/Environmental Protection Bureau/Rapid Transit Bureau/Cultural Affairs Bureau/Transportation Bureau/Legal Affairs Bureau/Land Administration Bureau/Information Bureau/Research Development and Evaluation Commission/Indigenous Peoples Commission/Hakka Affairs Commission/Budget and Accounting Office/Personnel Office/Civil Service Ethics Office/Open University/District Office
2. Put "None" for any field that cannot be summarized

# Output Format
Output the text directly, without <template> and </template>

<template>
Complainant name:  XXX
Complainant phone: XXX
Description: XXX
Responsible agency: XXX
District: XXX
Neighborhood (li): XXX
Location (address): XXX
</template>
```

### Voice Conversation Transcript <a href="#voice-conversation-transcript" id="voice-conversation-transcript"></a>

```
Representative:
Hello, this is the Citizen Service Hotline. How may I help you?

Citizen:
Oh... um, hello, I'd like to report a problem in our neighborhood. Oh right, my surname is Zhang! Oh, my phone number is... hold on, 0912, huh? Oh right, 0912-345-678, sorry, I forgot for a moment.

Representative:
Alright, Mr. Zhang, your phone number is 0912-345-678. How can we help you?

Citizen:
Well, so, near my home there's a... a small park, and the, um, lights inside have been broken for a long time and nobody's fixed them. It's pitch dark at night, really scary. Kids often play there, but now nobody dares to go there at night.

Representative:
I see. Could you tell me the exact location of this small park?

Citizen:
Oh... what's the place called... um, oh! It's in Neihu District, uh... I think it's called Yangguang Li? Yes, yes, the small park in Yangguang Li, near Wende Road, you know it?

Representative:
So it's the park in Yangguang Li, Neihu District, near Wende Road, correct?

Citizen:
Yes, yes, that's it! There, and several lights are broken. I'm not sure which ones, maybe the ones near the benches in the middle, anyway it's super dark there at night now. Can you help take care of it?

Representative:
Sure, I'll record your issue and pass it to the relevant department. Is there anything else I can help you with?

Citizen:
Oh, no, that's all. Thank you for your help.

Representative:
Alright, thank you for calling the Citizen Service Hotline. Have a nice day!
```

### Summary Result <a href="#summary-result" id="summary-result"></a>

```markdown
Complainant name: Mr. Zhang
Complainant phone: 0912-345-678
Description: Streetlights in the small park in Yangguang Li, Neihu District are out. The park is near Wende Road, and the darkness at night affects residents' safety.
Responsible agency: Public Works Bureau
District: Neihu District
Neighborhood (li): Yangguang Li
Location (address): Small park in Yangguang Li, Neihu District, near Wende Road
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/en/serve/voicecs/call-summary.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
