Skip to content

Implement deep_researcher with Kitaru instead of LangGraph. - #2

Open
GabrielAndrus wants to merge 4 commits into
IMJONEZZ:mainfrom
GabrielAndrus:main
Open

Implement deep_researcher with Kitaru instead of LangGraph. #2
GabrielAndrus wants to merge 4 commits into
IMJONEZZ:mainfrom
GabrielAndrus:main

Conversation

@GabrielAndrus

Copy link
Copy Markdown

Implemented deep_researcher.py using Kitaru. The checkpoints are declared in checkpoints.py, models in models.py.
The file deep_research_flow.py contains the flow of each checkpoint.

…are declared in checkpoints.py, models in models.py. The file deep_research_flow.py contains the flow of each checkpoint.
LMSTUDIO_BASE_URL = "http://192.168.1.79:8080/v1"
LMSTUDIO_API_KEY = "local"
MODEL = "openai:gpt-oss-120b"
SEARXNG_HOST = "http://192.168.1.36:4000"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that this is coming directly from my coursework, so it's not that big of a deal, but it is important to generally put stuff like this in a .env file that doesn't get committed, and have an .env.sample that can be copied with all of the empty fields.

Comment thread 19_RLVR/finance_rlvr.py

# %%
def reward_100_rule(response, user_profile):
max_stock = 100 - user_profile["age"]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The max stock is 100 - the age of the user? I don't understand what this is giving us.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is following the 100 rule -- subtract your age from 100 to get the percentage of your portfolio that should be in stocks, rest goes in bonds. The reasoning is that younger people can take more risks on stocks and older people cannot (and should have more of their portfolio in safer assets).

Comment thread 19_RLVR/finance_rlvr.py
return 0.5

def reward_disclaimer(response):
return 1.0 if "not financial advice" in response.lower() else 0.0

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like a LARGE reward for the disclaimer being present, I like it, and hope it holds up mathematically

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll keep this comment open in case it doesn't hold up mathematically.

Comment thread 19_RLVR/finance_rlvr.py
return outputs

# %%
responses = generate("What should I invest in at age 60?")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could show some good context engineering practice here for building this prompt both better and automatically?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too familiar with context engineering. What kind of prompts are you thinking of?

@GabrielAndrus GabrielAndrus left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants