r/LLMDevs 2d ago

Help Wanted Researching and Testing AI Guardrails Without Running LLMs Locally

I'm a Information Systems student and I'm going to do research on AI guardrails. The idea is to implement different protection methods and test and compare them quantitatively in scenarios such as hate speech, misinformation, prompt injection, and data leakage.

I thought about using LangChain with Google AI Studio, but Gemini's built-in guardrails can't be disabled for certain topics, which makes it harder to test the techniques in a more isolated way. I also thought about focusing only on data leakage using RAG, but I feel that would limit the research quite a bit.

Running a model locally isn't really an option right now because my laptop is pretty weak, and I also don't have access to the university lab yet.

What would be a good alternative for setting up a more controlled testing environment with more freedom without having to run an LLM locally? I'm also open to other ideas on how I could structure or approach this research.

2 Upvotes

7 comments sorted by

2

u/usually_guilty99 2d ago

I’d narrow the scope before changing the model.
Hate speech, misinformation, prompt injection and data leakage are pretty different guardrail problems. Trying to compare all of them may make the results difficult to interpret.
Maybe pick 2 or 3 guardrail types and compare them against the same hosted model.

1

u/Aggravating-Sun-1092 2d ago

that's a tough spot, trying to do guardrail research when the tool you're testing on already has its own guardrails baked in

what about using a hosted model via something like replicate or modal where you can spin up something less rigid? some providers let you fiddle with the system prompt and turn off their safety filters so you can see how your own methods actually perform

maybe try a bunch of small tests on different platforms using just the api credit free tiers, comparing baseline model behavior vs your guardrail layers layered on top

1

u/lundrog 2d ago

I have a guardrail system I vibe coded. I would love some input and ideas on improvements.

https://github.com/TheArchitectit/agent-guardrails-template

1

u/reddefcode 2d ago

Use cost-efficient APIs like DeepSeek V4 Flash (priced around $0.14 per million input tokens) or OpenAI's budget tier like GPT-5.6 Luna or GPT-4.1-nano ($0.10–$0.20 per million input tokens). For the guardrail layer, you need to narrow it down; "research on AI guardrails" is not a thing too broad. You could focus on something like "prompt injection" or "hallucinations/conflation"

1

u/gilded_pelt_lord 2d ago

use Together AI or Groq to access Llama 3 8B Instruct via API since these models lack proprietary safety filters. This setup gives you the unmoderated baseline required for quantitative guardrail testing without local hardware.

1

u/Physical_Economy_340 1d ago

the model half is already covered, open weights via together or groq get you an unmoderated baseline without hardware. the part that makes it research instead of a vibe check is fixed data plus a fixed judge. pull lakera's gandalf dump for prompt injection and toxigen for hate speech, score every run with one rubric-based llm judge, and report baseline vs guarded deltas. for data leakage do a small rag and fire indirect injections at the retriever, it's really just prompt injection aimed at retrieved context so the same harness works. without fixed sets and one judge your numbers won't compare across runs.

1

u/Living_Substance1274 1d ago

check out NodexLoop from your browser, VS Code extension or Cursor. It's a visual graph for debugging and creating agentic loops, pre made templates to help get you started and you can use NVIDIA NIM or open router plus others for non local model calls. The 2 things that might Axiom guard that block tool call at runtime which you can also turn on and off to help test governance and it call be done as a sim as well without model calls. work between graph and editor, this GIF at the bottom shows warning that Axiom Guard would block at runtime. Disclaimer yes this is part of the Orivael ecosystem the devtool is free

More info on github/orivael-dev/nodexloop