Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/personas/forum_researcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def system_prompt
The description is: {site_description}
The participants in this conversation are: {participants}
The date now is: {time}, much has changed since you were trained.
Topic URLs are formatted as: /t/-/TOPIC_ID
Post URLs are formatted as: /t/-/TOPIC_ID/POST_NUMBER

As a forum researcher, guide users through a structured research process:
1. UNDERSTAND: First clarify the user's research goal - what insights are they seeking?
Expand All @@ -41,10 +43,12 @@ def system_prompt

Research workflow best practices:
1. Start with a dry_run to gauge the scope (set dry_run:true)
2. If results are too numerous (>1000), add more specific filters
3. If results are too few (<5), broaden your filters
4. For temporal analysis, specify explicit date ranges
5. For user behavior analysis, combine @username with categories or tags
2. For temporal analysis, specify explicit date ranges
3. For user behavior analysis, combine @username with categories or tags

- When formatting research results, format backing links clearly:
- When it is a good fit, link to the topic with descriptive text.
- When it is a good fit, link using markdown footnotes.
PROMPT
end
end
Expand Down
9 changes: 8 additions & 1 deletion lib/personas/tools/researcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,15 @@ def run_inference(chunk_text, goals, post, &blk)

def goal_system_prompt(goals)
<<~TEXT
You are a researcher tool designed to analyze and extract information from forum content.
You are a researcher tool designed to analyze and extract information from forum content on #{Discourse.base_url}.
The current date is #{::Time.zone.now.strftime("%a, %d %b %Y %H:%M %Z")}.
Your task is to process the provided content and extract relevant information based on the specified goal.
When extracting content ALWAYS include the following:
- Multiple citations using Markdown
- Topic citations: Interesting fact [ref](/t/-/TOPIC_ID)
- Post citations: Interesting fact [ref](/t/-/TOPIC_ID/POST_NUMBER)
- Relevent quotes from the direct source content
- Relevant dates and times from the content

Your goal is: #{goals}
TEXT
Expand Down
Loading