Lzy01241010 commited on
Commit
a10ede5
Β·
1 Parent(s): 9707317

Header: drop Q mark, italicize Quest, capitalize byline; add vanilla memory strategy with explainer; restore example emojis

Browse files
Files changed (1) hide show
  1. app.py +31 -9
app.py CHANGED
@@ -344,10 +344,10 @@ gradio-app > div {
344
  color: var(--q-text) !important;
345
  }
346
  .quest-name {
347
- font-family: "Source Serif 4", "Source Serif Pro", ui-serif, Georgia, serif;
348
- font-style: italic;
349
- font-weight: 700;
350
- color: var(--q-accent);
351
  letter-spacing: 0.005em;
352
  margin: 4px 0 14px 0 !important;
353
  }
@@ -790,6 +790,17 @@ gradio-app > div {
790
 
791
  /* === Example buttons ==================================================== */
792
  .example-note { color: var(--q-muted); font-size: 13px; margin: 0 0 12px 0; line-height: 1.5; }
 
 
 
 
 
 
 
 
 
 
 
793
  .example-buttons { display: grid; gap: 10px; margin-top: 4px; }
794
 
795
  [class*="gradio-container"] .example-btn {
@@ -1328,7 +1339,7 @@ def _trace_to_json(state: "AgentState", used_model: str) -> str:
1328
  )
1329
 
1330
 
1331
- MEMORY_STRATEGIES = ("condenser", "discard-all", "hide-tool-results")
1332
 
1333
 
1334
  def _normalize_memory_strategy(strategy: str) -> str:
@@ -1664,25 +1675,29 @@ def run_ui(
1664
  EXAMPLES = [
1665
  {
1666
  "category": "Multi-hop facts",
 
1667
  "text": "Which actor played the lead in the 1994 film directed by Robert Zemeckis, and which novel was that film adapted from?",
1668
  },
1669
  {
1670
  "category": "Time-varying + multi-hop",
 
1671
  "text": "Who is the current CEO of the company that acquired GitHub in 2018, and what was that company's market capitalization at the close of the most recent quarter?",
1672
  },
1673
  {
1674
  "category": "Multi-constraint",
 
1675
  "text": "Find a 2-day itinerary in Tokyo under $250 focused on contemporary art museums and vegetarian restaurants, including transit between sites.",
1676
  },
1677
  {
1678
  "category": "Long-form research report",
 
1679
  "text": "Compare the LLM-safety research approaches of Anthropic, OpenAI, and Google DeepMind over the past 18 months, focusing on alignment techniques and red-teaming methodologies.",
1680
  },
1681
  ]
1682
 
1683
 
1684
  def _example_label(ex: Dict[str, str]) -> str:
1685
- return f"{ex['category']} β€” {ex['text']}"
1686
 
1687
 
1688
  with gr.Blocks(
@@ -1695,10 +1710,9 @@ with gr.Blocks(
1695
  gr.HTML(
1696
  """
1697
  <header class="quest-header">
1698
- <span class="quest-header-mark" aria-hidden="true">Q</span>
1699
  <div class="quest-header-text">
1700
- <h1 class="quest-header-title">Quest: A Fully Open Recipe for Training Deep Research Agents from Scratch</h1>
1701
- <a class="quest-header-byline" href="https://x.com/osunlp" target="_blank" rel="noopener noreferrer">built by OSU NLP Group</a>
1702
  </div>
1703
  </header>
1704
  """
@@ -1767,6 +1781,14 @@ with gr.Blocks(
1767
  choices=list(MEMORY_STRATEGIES),
1768
  value="condenser",
1769
  )
 
 
 
 
 
 
 
 
1770
  max_turns = gr.Slider(
1771
  label="Max Turns",
1772
  minimum=2,
 
344
  color: var(--q-text) !important;
345
  }
346
  .quest-name {
347
+ font-family: "Source Serif 4", "Source Serif Pro", ui-serif, Georgia, serif !important;
348
+ font-style: italic !important;
349
+ font-weight: 700 !important;
350
+ color: var(--q-accent) !important;
351
  letter-spacing: 0.005em;
352
  margin: 4px 0 14px 0 !important;
353
  }
 
790
 
791
  /* === Example buttons ==================================================== */
792
  .example-note { color: var(--q-muted); font-size: 13px; margin: 0 0 12px 0; line-height: 1.5; }
793
+ .memory-help {
794
+ color: var(--q-muted);
795
+ font-size: 12.5px;
796
+ line-height: 1.55;
797
+ margin: 6px 0 0 0;
798
+ padding: 10px 12px;
799
+ background: var(--q-surface-alt);
800
+ border: 1px solid var(--q-line);
801
+ border-radius: 8px;
802
+ }
803
+ .memory-help b { color: var(--q-text); font-weight: 600; }
804
  .example-buttons { display: grid; gap: 10px; margin-top: 4px; }
805
 
806
  [class*="gradio-container"] .example-btn {
 
1339
  )
1340
 
1341
 
1342
+ MEMORY_STRATEGIES = ("vanilla", "condenser", "discard-all", "hide-tool-results")
1343
 
1344
 
1345
  def _normalize_memory_strategy(strategy: str) -> str:
 
1675
  EXAMPLES = [
1676
  {
1677
  "category": "Multi-hop facts",
1678
+ "icon": "🎯",
1679
  "text": "Which actor played the lead in the 1994 film directed by Robert Zemeckis, and which novel was that film adapted from?",
1680
  },
1681
  {
1682
  "category": "Time-varying + multi-hop",
1683
+ "icon": "πŸ“ˆ",
1684
  "text": "Who is the current CEO of the company that acquired GitHub in 2018, and what was that company's market capitalization at the close of the most recent quarter?",
1685
  },
1686
  {
1687
  "category": "Multi-constraint",
1688
+ "icon": "🧩",
1689
  "text": "Find a 2-day itinerary in Tokyo under $250 focused on contemporary art museums and vegetarian restaurants, including transit between sites.",
1690
  },
1691
  {
1692
  "category": "Long-form research report",
1693
+ "icon": "πŸ“š",
1694
  "text": "Compare the LLM-safety research approaches of Anthropic, OpenAI, and Google DeepMind over the past 18 months, focusing on alignment techniques and red-teaming methodologies.",
1695
  },
1696
  ]
1697
 
1698
 
1699
  def _example_label(ex: Dict[str, str]) -> str:
1700
+ return f"{ex['icon']} {ex['category']} β€” {ex['text']}"
1701
 
1702
 
1703
  with gr.Blocks(
 
1710
  gr.HTML(
1711
  """
1712
  <header class="quest-header">
 
1713
  <div class="quest-header-text">
1714
+ <h1 class="quest-header-title"><span class="quest-name">Quest</span>: A Fully Open Recipe for Training Deep Research Agents from Scratch</h1>
1715
+ <a class="quest-header-byline" href="https://x.com/osunlp" target="_blank" rel="noopener noreferrer">Built by OSU NLP Group</a>
1716
  </div>
1717
  </header>
1718
  """
 
1781
  choices=list(MEMORY_STRATEGIES),
1782
  value="condenser",
1783
  )
1784
+ gr.HTML(
1785
+ '<div class="memory-help">'
1786
+ '<b>vanilla</b> β€” full history kept every turn, no management.<br>'
1787
+ '<b>condenser</b> β€” keep history, inject a research-state summary every 3 turns.<br>'
1788
+ '<b>discard-all</b> β€” every 8 turns, reset to system prompt + original question only.<br>'
1789
+ '<b>hide-tool-results</b> β€” keep at most the 3 most recent tool responses; older ones are stubbed out.'
1790
+ '</div>'
1791
+ )
1792
  max_turns = gr.Slider(
1793
  label="Max Turns",
1794
  minimum=2,