Thoughts on Working with AI¶
Mental Model¶
Think of working with AI as working with a peculiar RA. The RA is very smart, knows lots of math, etc. But: - The RA knows nothing about you or your project. He doesn't even know that you are an economist doing research. - Each time you start a new session, you get a brand new RA who knows nothing about what you worked on in the past.
But in other ways, the RA suffers from common human problems. He can only handle a limited amount of information. Feed him more and he starts to forget and gets confused. In AI speak: his context window is limited.
To solve the limited memory problem, you do exactly what a human RA would do: you as the RA to take notes. Every time the RA reads a paper, let him write a summary to a file. Every time he summarizes literature, let him use his summaries to refresh his memory. Then write the summary to a file.
That's the key point: To remember information, it needs to be written to a file.
The same strategy also solves the problem that you get a new RA every day. The new RA has no clue what the previous one did, but he can read the summary files and get up to speed.
Skills¶
Since your new RA is clueless and has no information about who you are and how you work, you need to write detailed instructions. Since you don't want to repeat yourself every time you submit a query, those instructions need to be written into files as well. In Claude Code, those instruction files are called skills.
Example: You want your RA to summarize papers.
- Make a paper-summary skill. That means: write a SKILL.md file into .claude/skills/paper-summary/.
- The skill file explains in detail what the RA should do. How should the report be structured? What key information to look for?
- The skill also instructs the RA to write the summary into a markdown file. You specify the file name, such as "paper-dir/paper-filename-summary.md".
Chat vs Code¶
Chats are useful for one-off conversations. - You can upload files, but the chat cannot see your file system. Every time the file changes, you need to re-upload it to the same chat (or start a new one). - Chats can only produce text (or image) reponses. They cannot write or modify files. - It follows that Chats have limited memory. Everything you want Claude to know during a chat has to fit into the context window (its limited memory).
Claude Code relaxes these limitations. - It can see and modify files in folders that you permit it to see. - It can write reponses to files. Later, it can come back to those files to refresh its memory.