Yu-Ting ShihAndrew Shih
Menu / Language

Source

智慧聊天機器人開發實錄:與GenAI協作的全方位指南

The original process serves users/setup operators, developers/maintainers and learners. The examples below are adapted learning prompts, not quotations of actual conversations.

1. Requirements and context

Separate file processing from text commands. Supply existing GAS functions, worksheet names, columns and Drive purpose using placeholders, never live credentials.

Practice prompt

I am building a LINE Bot with Google Apps Script. Start with text replies, then file logs. List the inputs, outputs and fields to confirm; do not replace the existing architecture.

Evidence to retain: input, expected outcome, actual outcome, correction and retest.

2. Design first, implement one function at a time

Map the user, LINE, GAS, Gemini, Sheets and Drive flow. Implement getLogData, API calls and intent extraction separately, specifying inputs, outputs and failure handling.

Practice prompt

Design getLogData(keyword) using the existing file-log columns. Filter filename or summary and return objects. Confirm column names before adding any.

Evidence to retain: input, expected outcome, actual outcome, correction and retest.

3. Test, debug and refactor

Provide de-identified code, errors, reproduction steps and screenshots. Distinguish deployment, authorization, data format and API failures. Make the smallest correction and retest before adding features.

Practice prompt

Expected: reply and one new log row. Actual: reply without a log. Here is de-identified code and the execution error. Propose testable causes and checks before changes.

Evidence to retain: input, expected outcome, actual outcome, correction and retest.

4. Hand over context and extend the project

Hand over a working version, feature list, schema, known issues and next step. The source 100k-token threshold is historical experience, not a universal limit. Extend with Flex Message, file explanations, HTML reports, spreadsheet Q&A and Threads incrementally.

Practice prompt

Here is the working version and test evidence. Add only file explanations, retaining existing columns, function names and reply flow. Identify changes and regression tests.

Evidence to retain: input, expected outcome, actual outcome, correction and retest.

Learning checks