Chapter 12 Cost and security

This chapter addresses important practical considerations when using LLMs for R programming:

12.1 Cost considerations

  • PIs need to consider cost and impact on research budget
  • e.g. Copilot subscription free for students
  • Tools like Roo Code can be more expensive (pay per use as using API).
  • Still less than a person (currently)
  • e.g. processing 6000 abstracts to extract data for a lit review might cost about USD300 (including cost of developing prompts)
  • Strategies for optimizing token usage
  • Balancing cost with capability requirements

AI companies are running at a loss and its quite likely that costs will go up in future. The aim right now is to get us all dependent on the technology, so that we have to keep paying in future (another reason I think its improtant our own countries develop these capaibilites, and that we also need to strive to be capable to work in AI free ways as well. )

12.2 API security

  • Managing API keys and credentials
  • Sanitizing inputs to remove sensitive information
  • Local vs. cloud-based LLM solutions
  • Auditing and monitoring LLM interactions

12.3 Agent security

  • Can run code on your computer
  • Be careful what it is doing
  • Read prompts before running them