Notebooks

Interactive research workspace combining AI chat, code, SQL, and documentation.

Notebooks are Ragnerock’s interactive research workspace. In addition to standard code cells and markdown cells, notebooks include two additional cell types: chat cells for conversations with the Research Agent, and query cells for running SQL against your operators.

When the Research Agent generates a table of results, those results become a DataFrame variable you can import into a code cell and work with using pandas, polars, or any Python library.

Creating a Notebook

Click the Research quick action on the welcome screen, or navigate to the Notebooks section in the sidebar and click New. Give it a name and you’ll be taken to an empty notebook with a message cell ready for your first question.

Cell Types

Notebooks support four cell types:

  • Message: Chat cells for interacting with the Research Agent. You type a question, the agent responds with analysis, citations, and artifacts. Follow-up messages build on the conversation context.
  • Code: Python code cells executed by a Jupyter kernel. Use these for custom analysis, visualization, or working with imported artifacts. Run with Shift+Enter.
  • Query: SQL cells for querying your operator tables directly. Results display inline with row counts and execution time, and automatically create DataFrame artifacts.
  • Markdown: Free-form text cells for documenting your methodology, recording observations, or adding narrative structure to your research.

You can mix cell types freely. A typical workflow might start with message cells to explore a topic, add query cells to pull structured data, then use code cells for quantitative analysis, all in the same notebook.

Add new cells using the + button in the toolbar or by hovering between existing cells and clicking the insert button.

Research Agent

The Research Agent is Ragnerock’s conversational AI assistant, purpose-built for data research. It lives inside notebooks and has access to all data sources and annotations in your project.

How It Works

The Research Agent combines:

  • Semantic search across your entire data library
  • Access to annotations and structured data from your operators
  • Multi-step reasoning to synthesize complex insights
  • Code generation to create runnable analysis
  • SQL queries to pull data from your operator tables
  • Full citations for every claim it makes

Asking Questions

Type a question in the message input and press Enter. The agent searches your data, synthesizes information, and responds with citations:

“What risk factors do our portfolio companies mention most frequently in their 10-K filings?”

“Compare the revenue guidance in Apple’s last three earnings calls”

“Write a script to calculate year-over-year revenue growth for each company”

The response streams in with formatted headings, bullet points, and citation markers linking back to source passages.

Building Context

Follow-up messages build on previous responses. You don’t need to repeat context:

“Which of those risk factors are new compared to the prior year?”

“Now do the same comparison for Microsoft”

The agent maintains conversation context throughout the notebook. Explicitly switch topics when you need to start fresh:

“Let’s move on to analyzing supply chain disclosures instead.”

Scoping with Documents

By default, the agent searches across all data in your project. To focus on specific files:

  1. Click the Attach documents button (paper clip icon) in the message input
  2. Search for and select the files you want the agent to analyze
  3. Click Done
  4. Type your question and send

The agent concentrates its analysis on the attached files rather than searching the full library.

Capabilities

Search: Find relevant passages across your data library. The agent searches semantically, understanding the meaning behind your query rather than just matching keywords.

Data Analysis: Query your operator tables for quantitative insights. The agent can perform calculations and present results as interactive DataFrame artifacts.

Synthesis: Combine information from multiple sources into coherent analysis with citations to each source.

Code Generation: Generate Python code as runnable notebook cells. If auto-accept is enabled in the toolbar, code cells execute automatically; otherwise you review and accept them first.

Citations and Provenance

Every response from the Research Agent includes citations back to source documents. Click on any citation marker to:

  • See the original text: The exact passage from the source
  • Jump to the source: Navigate directly to the page and location in the original file
  • Verify the context: Read the surrounding text to ensure the excerpt hasn’t been taken out of context This provenance chain is critical for verification, compliance, and audit trails.

Artifacts

When the Research Agent responds or a query cell executes, the results often include artifacts: structured outputs that appear as interactive badges in the cell output.

Types of Artifacts

  • DataFrames: Tabular data from analysis, queries, or structured extraction. The most common artifact type and the primary bridge to code cells.
  • Search Results: Search results with relevance scores and metadata.
  • Citations: References back to specific passages in source files.
  • Plots: Visualizations generated by the agent or code cells.

Working with Artifacts

Click an artifact badge to preview its contents. From the preview, you can:

  • Inspect the data without leaving the notebook
  • Create a query cell to explore a DataFrame with SQL
  • Import the artifact into Python as a variable
  • Trace citations back to the original source

From Conversation to Code

The artifact system bridges conversation and code:

  1. Ask: You ask the Research Agent to analyze a topic across your data
  2. Receive: The agent responds with analysis, citations, and a DataFrame artifact
  3. Import: Click the DataFrame badge and select Import to create it as a Python variable
  4. Analyze: The variable is immediately available in code cells
# After importing the agent's DataFrame artifact as `revenue_data`
import pandas as pd

df = pd.DataFrame(revenue_data)
print(f"Companies analyzed: {df['company'].nunique()}")
print(f"Date range: {df['quarter'].min()} to {df['quarter'].max()}")

# Calculate year-over-year growth
df['yoy_growth'] = df.groupby('company')['revenue'].pct_change(4)
df.sort_values('yoy_growth', ascending=False).head(10)

Artifacts use plain Python dictionaries (records format), so they work with any library: pandas, polars, DuckDB, or raw Python.

Query cells follow the same pattern. Run a SQL query, and the results become a DataFrame artifact you can import into code cells:

SELECT company, fiscal_year, revenue, net_income
FROM financial_metrics
WHERE fiscal_year >= 2023
ORDER BY revenue DESC

Best Practices

  1. Start with questions, refine with code: Use message cells to explore a topic broadly, then switch to code and query cells for precise analysis
  2. Attach documents to scope the agent: When you need analysis of specific filings or reports, attach them rather than relying on search
  3. Use query cells for structured data: SQL queries give you direct access to operator outputs with precise filtering
  4. Import artifacts for deeper analysis: Don’t re-extract data manually; import the agent’s artifacts and build on them in code cells
  5. Document as you go: Add markdown cells to capture methodology and observations while they’re fresh

Next Steps