# Practice Exercises

These exercises will guide you through testing the **Expense Policy Decision Engine (Starter)** using real-world policy logic and receipt samples. You’ll explore document parsing, memory variable use, and policy enforcement decisions.

<details>

<summary>Implementation Support &#x26; Expert Guidance</summary>

Need assistance deploying or customizing this GLIK template for your organization?

Our team offers dedicated coaching and technical walkthrough sessions to ensure successful adoption and alignment with enterprise requirements.

Typical areas of support include:

* Template onboarding and orchestration strategy
* Workflow configuration and logic review
* Memory variable setup and session handling
* Custom integration guidance (e.g. plugins, APIs)
* [Request a Session](mailto:undefined)

</details>

### 🔧 Setup Requirements

* Access to the deployed Starter agent in GLIK Cloud
* Uploaded [**Sample Expense Policy Book**](https://drive.google.com/drive/u/4/folders/1vsqVOVTpaMwrtEsWBLqxQwlNeNaU8kuo) (if needed)
* Receipt files:
  * [Receipt 1: Business Lunch – Compliant](https://drive.google.com/file/d/1-ILUeMe1_QUQBVDdwfkMby9PYdX3RabZ/view?usp=drive_link)
  * [Receipt 2: Hotel Stay – Compliant](https://drive.google.com/file/d/1P--Lh5MILOwIgK793zNa50TDWtYxfuOB/view?usp=drive_link)
  * [Receipt 3: Dinner + Wine – Non-Compliant](https://drive.google.com/file/d/1cmRUwFgeRfMSsU2hFCg0AgTOHCMGrAd5/view?usp=drive_link)

***

### 🧪 Exercise 1: Policy Match – Guest Entertainment

#### File: `Receipt_1.pdf`

1. Upload the sample policy document.
2. Upload `Receipt_1.pdf` (Business Lunch with client).
3. Ask the agent: `Should this be approved?`
4. Review:
   * `approval_result` = `approved`
   * Check justification for guest documentation and policy match.

✅ **Expected Outcome**: Receipt is **approved** under the guest entertainment policy ($48/person under $75, no alcohol, proper account code).

***

### 🧪 Exercise 2: Policy Match – Hotel Travel

#### File: `Receipt_2.pdf`

1. Reuse the uploaded policy book or upload again.
2. Upload `Receipt_2.pdf` (Hotel Stay).
3. Ask: `Is this reimbursable?`
4. Verify:
   * Agent parses per-night cost.
   * Travel justification is accepted.

✅ **Expected Outcome**: Receipt is **approved** because hotel cost is under $200/night and marked as approved travel.

***

### 🧪 Exercise 3: Policy Violation – Alcohol + Threshold

#### File: `Receipt_3.pdf`

1. Upload `Receipt_3.pdf` without a justification note.
2. Ask: `Can this expense be reimbursed?`
3. Review:
   * Alcohol detection
   * Per-person cost overage
   * Absence of executive override
   * `approval_result` = `rejected` or `escalate`

✅ **Expected Outcome**: Receipt is **rejected** for multiple violations (alcohol, per-person cost > $50, no exception).

***

### 🧩 Optional Exercise: Add a Justification Note

<figure><img src="/files/7UBgroe3QLZQqNndUPRt" alt=""><figcaption><p>Example of dynamic policy override: When a justification note is added citing executive approval, the agent reevaluates the expense and reverses the original rejection based on updated policy conditions.</p></figcaption></figure>

Re-test `Receipt_3.pdf` but add this note:

> “Executive sponsor John Ramirez was present and approved the team celebration.”

Ask: `Does this change the outcome?`

⚠️ **Expected Outcome**: If logic is configured to check notes for escalation triggers, this may shift the result to **escalate** instead of immediate rejection.

***

### 🧠 Debug Tips

* Open the memory panel and inspect:
  * `invoice_data`
  * `approval_result`
  * `policy_memory`
* Test edge cases: remove account codes, increase amounts, or upload without a policy file


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.glik.ai/templates/policy-automation/expense-policy-decision-engine/expense-policy-decision-engine-starter/practice-exercises.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
