Skip to main content

Editing Cache Entries

Learn how to safely edit cache entries to update responses, improve accuracy, and enhance chatbot performance.

Why Edit Cache Entries?​

Cache entries need regular updates to stay accurate and relevant:

  • πŸ“ Update outdated information (new requirements, changed policies)
  • ✨ Improve answer quality (clearer wording, better structure)
  • 🎯 Add question variations (help more users find the answer)
  • πŸ”§ Fix errors (typos, incorrect facts, broken sources)
  • βš™οΈ Adjust settings (confidence, TTL, status)
Best Practice

Review and update cache entries regularly based on their TTL (Time-To-Live) to maintain accuracy.

Opening the Edit Modal​

Step 1: Find the Cache Entry​

Use search and filters to locate the entry you want to edit.

Step 2: Click the Edit Button​

In the cache list, click the "Edit" button (✏️ icon) for the entry you want to modify.

Step 3: Edit Modal Opens​

A popup window (modal) appears showing all editable fields.


Understanding Edit Modal Fields​

The edit modal contains several sections. Let's go through each one:

Section 1: Question​

Field: Question

Purpose: The main question this cache entry answers

Guidelines:

  • βœ… Write as a complete, natural question
  • βœ… Use the most common way users ask
  • βœ… Keep it concise (1-2 sentences max)
  • ❌ Don't use abbreviations unless common
  • ❌ Avoid overly specific phrasing

Examples:

  • βœ… Good: "What are the admission requirements for the HFIM program?"
  • ❌ Too specific: "What are the exact admission requirements for undergraduate HFIM majors applying in Fall 2026?"
  • βœ… Good: "Who is the academic advisor for HFIM?"
  • ❌ Too casual: "who's the advisor"

Section 2: Response​

Field: Response Text

Purpose: The answer the chatbot will return when this entry matches

Guidelines:

  • βœ… Write clear, complete answers
  • βœ… Use proper grammar and punctuation
  • βœ… Include relevant details without overloading
  • βœ… Break long answers into paragraphs or bullet points
  • βœ… Use consistent formatting across entries
  • ❌ Don't include outdated dates
  • ❌ Avoid opinions or subjective statements (unless clearly labeled)

Formatting Tips:

**Bold**: Use **asterisks** for emphasis
*Italic*: Use *single asterisks* for slight emphasis
β€’ Bullets: Use bullet points for lists
Paragraphs: Separate with blank lines

Links: Use full URLs or [text](URL) format

Example Response:

The HFIM program requires the following for admission:

β€’ Minimum 3.0 high school GPA
β€’ SAT score of 1200+ or ACT score of 24+
β€’ Completed application by January 15
β€’ Personal statement (500 words)
β€’ Two letters of recommendation

For more details, visit the admissions office or email admissions@uga.edu.

Section 3: Sources​

Field: Sources (JSON)

Purpose: Documents used to create this response, shown as citations to users

Format: JSON array of objects

Structure:

[
{
"filename": "HFIM_Handbook_2026.pdf",
"page": 12,
"section": "Admission Requirements"
},
{
"filename": "FAQ_Document.pdf",
"page": 3
}
]

Guidelines:

  • βœ… List actual source documents
  • βœ… Include page numbers when possible
  • βœ… Add section names for clarity
  • βœ… Use correct JSON format (brackets, quotes, commas)
  • ❌ Don't leave empty if sources exist
  • ❌ Don't include fictional documents

Tip: Use a JSON validator (like jsonlint.com) if you're unsure about formatting.


Section 4: Confidence Score​

Field: Confidence

Purpose: Your confidence level in the answer's accuracy (0.00 to 1.00)

Recommended Levels:

ScoreConfidence LevelUse ForExample
0.95-1.0Very HighOfficial facts, verified infoProgram requirements, contact emails
0.85-0.94HighGenerally accurate, stableCourse descriptions, faculty bios
0.70-0.84MediumHelpful but may varyGeneral advice, suggestions
< 0.70LowUncertain or outdatedOld information, unverified claims

How to Choose:

  1. Verified from official sources? β†’ 0.95+
  2. Based on current documentation? β†’ 0.85-0.94
  3. General knowledge, may change? β†’ 0.70-0.84
  4. Uncertain or needs review? β†’ < 0.70
Low Confidence Impact

Entries with confidence < 0.70 are less likely to match user questions. Use low confidence only when you're genuinely unsure about accuracy.


Section 5: TTL (Time-To-Live)​

Field: TTL (days)

Purpose: How many days until this entry should be reviewed for accuracy

Recommended Values:

TTLUse ForExamples
7 daysChanges frequentlyCurrent semester deadlines, event dates
30 daysNeeds occasional reviewFaculty office hours, course schedules
90 daysStable informationProgram history, degree requirements
180 daysPermanent factsMission statement, core values

How It Works:

  • TTL is a reminder, not a hard expiration
  • Entries don't stop working when TTL expires
  • Use TTL to track when you should review the entry

Tip: Set calendar reminders based on important TTL dates to ensure timely updates.


Section 6: Status​

Field: Status

Purpose: Whether this cache entry is active (in use) or inactive (disabled)

Options:

  • Active: Chatbot uses this entry to answer questions
  • Inactive: Entry is stored but not used

When to Set Inactive:

  • ⏸️ Information is temporarily outdated (will be updated soon)
  • ⏸️ Testing a new version of the entry
  • ⏸️ Seasonal information (summer internships in fall semester)
  • ⏸️ Uncertain accuracy, needs verification

When to Keep Active:

  • βœ… Information is current and accurate
  • βœ… Answer is helpful and correct
  • βœ… Sources are valid
Don't Deleteβ€”Inactivate

Instead of deleting outdated entries, set them to "Inactive." You can reactivate later if the information becomes relevant again.


Section 7: Question Variations​

Field: Question Variations

Purpose: Alternative ways users might ask the same question

Format: One variation per line

Example:

What is HFIM?
Tell me about the HFIM program
Explain Hospitality and Food Industry Management
What does HFIM stand for?
Is HFIM a good major?
HFIM program information

Guidelines:

  • βœ… Include common misspellings (professer β†’ professor)
  • βœ… Add abbreviations (HFIM vs. Hospitality)
  • βœ… Include casual phrasing ("who's the advisor" vs. "Who is the academic advisor")
  • βœ… Use different question formats (question vs. statement)
  • βœ… Add 5-15 variations for important entries
  • ❌ Don't add completely unrelated questions

Pro Tip: Use the AI-powered Variation Generator to create variations automatically!


Section 8: Admin Notes​

Field: Admin Notes (Internal)

Purpose: Notes for other administrators (not shown to users)

Use For:

  • πŸ“ Explanation of changes made
  • πŸ” Reasons for specific confidence scores
  • ⏰ Reminders for future updates
  • πŸ”— Links to internal documents
  • πŸ‘₯ Notes about who to contact for updates

Example:

Updated for Fall 2026 requirements.
Confirmed with Dr. Smith on 1/10/2026.
Re-review when Spring 2027 handbook is published.
Private Notes

Admin notes are never shown to chatbot users. Use them freely for internal documentation.


Step-by-Step Editing Process​

Basic Edit Workflow​

  1. Open the edit modal (click Edit button)
  2. Review current content - Read what's already there
  3. Make your changes - Edit fields as needed
  4. Verify accuracy - Double-check facts and sources
  5. Set appropriate confidence - Reflect your certainty level
  6. Update TTL - Set review reminder
  7. Add variations (optional) - Improve matching
  8. Save changes - Click "Save Changes" button

Scrolling in the Edit Modal​

The edit modal shows several fields. Some fields are below the fold (off-screen) when the modal first opens.

To see all fields: Scroll down within the modal to view:

  • Status dropdown
  • Question Variations textarea
  • Admin Notes textarea
  • Action buttons (Save Changes, Cancel, Generate Variations)
Modal Scrolling

Use your mouse wheel or trackpad to scroll within the modal. The main page behind the modal won't scrollβ€”only the modal content.


Saving Your Changes​

Save Changes Button​

Located at the bottom of the edit modal:

  1. Review all fields one final time
  2. Click "Save Changes"
  3. Wait for confirmation (green success message or modal closes)
  4. Verify in the cache list (entry shows "Last Updated" with current date)

What Gets Saved​

When you click "Save Changes":

  • βœ… All field changes are saved immediately
  • βœ… "Last Updated" timestamp updates
  • βœ… Changes take effect within seconds (hot reload)
  • βœ… Activity log records your changes

No "Undo": Once saved, changes are live. Be sure before saving!


Canceling Changes​

Cancel Button​

If you want to exit without saving:

  1. Click "Cancel" at the bottom of the modal
  2. Or click the X in the top-right corner
  3. Or press Esc key
Unsaved Changes Lost

Clicking Cancel or closing the modal discards all changes. There's no "Are you sure?" promptβ€”changes are immediately lost.


Common Editing Tasks​

Task 1: Update Outdated Information​

Scenario: Program requirements changed for Fall 2026

Steps:

  1. Find the affected cache entry
  2. Click Edit
  3. Update the Response field with new requirements
  4. Update Sources if using new documents
  5. Update TTL (e.g., 90 days for stable requirements)
  6. Add Admin Notes: "Updated for Fall 2026 per new handbook"
  7. Save Changes

Task 2: Improve Answer Clarity​

Scenario: Users report confusion about a cached answer

Steps:

  1. Review user feedback in Conversations
  2. Find the cache entry
  3. Click Edit
  4. Rewrite Response for better clarity
  5. Add examples or bullet points
  6. Keep Confidence high (if facts are correct)
  7. Add Admin Notes: "Improved clarity based on user feedback"
  8. Save Changes

Task 3: Fix Typos or Errors​

Scenario: You spot a typo in a cached response

Steps:

  1. Find the entry
  2. Click Edit
  3. Correct the typo in Question or Response
  4. No need to change other fields (confidence, TTL, etc.)
  5. Add Admin Notes: "Fixed typo"
  6. Save Changes

Task 4: Temporarily Disable an Entry​

Scenario: Information is outdated but will be updated soon

Steps:

  1. Find the entry
  2. Click Edit
  3. Change Status to Inactive
  4. Add Admin Notes: "Inactive until Fall 2026 handbook available"
  5. Save Changes

Remember: Set a reminder to reactivate once updated!


Task 5: Increase Confidence After Verification​

Scenario: You verified a low-confidence entry with official sources

Steps:

  1. Find the low-confidence entry
  2. Click Edit
  3. Verify Response matches official sources
  4. Update Sources to include new documentation
  5. Increase Confidence to 0.90+
  6. Add Admin Notes: "Verified with Dr. Smith, increased confidence"
  7. Save Changes

Managing Entry Status and Deletion​

Each cache entry row has several action buttons for managing its lifecycle. Understanding the difference between these options is crucial to avoid accidentally losing data.

Action Buttons Overview​

Cache Action Buttons

Each row in the cache list has these action buttons:

ButtonIconActionReversible?
Edit✏️Opens the edit modalYes
ViewπŸ‘οΈShows entry detailsN/A (read-only)
Deactivate/Activate⏸️/▢️Toggles active statusYes
Clear RedisπŸ—‘οΈRemoves from Redis cache onlyYes (re-caches on next use)
Delete❌Permanently removes from databaseNo

Deactivate vs Clear Redis vs Delete​

These three options serve very different purposes:

Option 1: Deactivate (⏸️ Deactivate)​

What it does: Sets the entry's status to "Inactive"

Effect:

  • βœ… Entry remains in the PostgreSQL database
  • βœ… Entry stops serving responses to users
  • βœ… Can be reactivated anytime with the "▢️ Activate" button
  • βœ… Preserves all data, history, and admin notes

Use when:

  • Information is temporarily outdated
  • You need time to verify accuracy
  • Seasonal content is out of season
  • Testing before making changes live

Example: Internship deadline info during summer break β†’ Deactivate, then reactivate in fall.


Option 2: Clear Redis (πŸ—‘οΈ Clear Redis)​

What it does: Removes this specific entry from the Redis cache layer only

Effect:

  • βœ… Entry remains in the PostgreSQL database
  • βœ… Entry remains active and can still serve responses
  • βœ… Redis cache for this entry is cleared (forces fresh lookup)
  • βœ… Entry will be re-cached in Redis on next use

Use when:

  • You updated an entry and want to force a cache refresh
  • Redis might have stale data for this entry
  • Troubleshooting cache inconsistencies
Redis vs PostgreSQL

The chatbot uses a two-tier cache:

  1. Redis (L1): Fast in-memory cache, checked first
  2. PostgreSQL (L2): Persistent database, checked if Redis misses

"Clear Redis" only affects the Redis layer. The PostgreSQL record is untouched.


Option 3: Delete (❌ Delete)​

What it does: PERMANENTLY removes the entry from the PostgreSQL database

Effect:

  • ❌ Entry is completely removed from the database
  • ❌ All data, history, variations, and admin notes are lost
  • ❌ Cannot be undone
  • ❌ Entry cannot be recovered

Safety measures:

  1. First confirmation dialog appears
  2. You must type "DELETE" (in all caps) to confirm
  3. Only then is the entry permanently removed

Use when:

  • Entry was created by mistake
  • Information is permanently irrelevant (e.g., discontinued program)
  • Duplicate entry that should never have existed
Permanent Action

The Delete button permanently removes data. There is no recycle bin or undo feature. Always prefer Deactivate unless you're certain the entry should never exist.


Decision Flowchart​

Use this flowchart to decide which action to take:

Is the information wrong or outdated?
β”‚
β”œβ”€β–Ί YES: Is it temporarily outdated?
β”‚ β”‚
β”‚ β”œβ”€β–Ί YES β†’ Use DEACTIVATE (can reactivate later)
β”‚ β”‚
β”‚ └─► NO: Is it permanently irrelevant?
β”‚ β”‚
β”‚ β”œβ”€β–Ί YES β†’ Use DELETE (after careful consideration)
β”‚ β”‚
β”‚ └─► NO β†’ Use EDIT to update the content
β”‚
└─► NO: Is there a caching issue?
β”‚
β”œβ”€β–Ί YES β†’ Use CLEAR REDIS (forces refresh)
β”‚
└─► NO β†’ No action needed

Common Mistakes to Avoid​

MistakeWhy It's a ProblemBetter Approach
Deleting instead of deactivatingLoses all data permanentlyDeactivate first, delete only if truly unnecessary
Clearing Redis when you meant to deactivateEntry still serves responsesUse Deactivate to stop serving
Deleting to "clean up" unused entriesMay need them laterDeactivate and add admin note explaining why

Editing Best Practices​

1. Verify Before Editing​

  • βœ… Check official sources first
  • βœ… Consult with program coordinators if unsure
  • βœ… Review existing documentation

Don't: Guess or make assumptions

2. Document Your Changes​

  • βœ… Use Admin Notes to explain edits
  • βœ… Include dates and sources
  • βœ… Note who provided information

Example: "Updated 1/15/2026 per Dr. Johnson, new course prerequisites"

3. Test Variations​

  • βœ… Think about how users actually ask questions
  • βœ… Include common misspellings
  • βœ… Add casual and formal versions

Don't: Only use official terminology

4. Set Appropriate Confidence​

  • βœ… Be honest about uncertainty
  • βœ… Lower confidence if information might change
  • βœ… High confidence only for verified facts

Don't: Default to 1.0 for everything

5. Update TTL Realistically​

  • βœ… Shorter TTL for changing information
  • βœ… Longer TTL for stable facts
  • βœ… Set reminders for important dates

Don't: Set overly aggressive TTL (7 days for everything)


Troubleshooting​

Problem: Changes Aren't Saving​

Possible Causes:

  1. Network issue - Check internet connection
  2. Session expired - Log in again
  3. Validation error - Check for required fields or format errors
  4. Browser issue - Try refreshing or different browser

Solution: Try saving again. If it fails, copy your changes to a text file and contact support.


Problem: Can't Find the Save Button​

Cause: Modal hasn't been scrolled down

Solution: Scroll down within the modal to see action buttons at the bottom.


Problem: Accidentally Clicked Cancel​

Cause: Closed modal without saving

Solution: Reopen the edit modal and make changes again. Consider copying text to a temporary note while editing to avoid losing work.


Problem: Changes Didn't Take Effect​

Cause: Hot reload may take a few seconds

Solution: Wait 30-60 seconds and check again. Refresh the page to verify.


Activity Log​

After saving changes, check the Activity Log at the bottom of the Cache Management page to verify your edit was recorded.

The activity log shows:

  • βœ… Your email address (who made the change)
  • βœ… Timestamp (when the change was made)
  • βœ… Action type (UPDATE)
  • βœ… Fields changed (old value β†’ new value)
Activity Log Errors

If the activity log shows "Failed to load," your changes were still saved successfully. The log is supplementary and doesn't affect core functionality.


Next Steps​

Now that you know how to edit cache entries:

  1. Generate variations to improve matching
  2. Perform bulk operations for efficiency
  3. Monitor performance metrics to prioritize edits
  4. Follow best practices for long-term success

Remember: Every edit affects the live chatbot within seconds. Always verify accuracy and test your changes when possible!