AI Agents · Course resources
Notes: Check How AI Uses Company Data (RAG, APIs and MCP)
Review the key ideas from Check How AI Uses Company Data (RAG, APIs and MCP).
From a document to an answer
A knowledge base contains material a system can search. Retrieving relevant material and supplying it to a model for an answer is retrieval-augmented generation, or RAG. The retrieved passages become part of the model’s context.
Embeddings represent information as lists of numbers that help software find related meanings. A vector database can store and search those lists. These are possible search components, not proof that the selected passage is correct. Check the document, passage, current version and whether the rule applies to the question.
Using a file and training a model are different
Supplying a contract passage for an answer does not by itself retrain the model. Check storage, access, retention and future training separately. For a custom product, identify other services that receive the information.
From a tool request to a live record
In the invoice example, the model requests a tool and supplies the invoice number. Function calling lets the model request an available function; application software runs the operation and returns its result. The code behind the tool can use the accounting API to obtain the record.
An MCP client inside an AI application can connect to an MCP server that offers tools and information. MCP provides common communication rules. It does not supply account permission or guarantee that a tool works. Reading an invoice and changing it are separate actions.
Test answers and actions
Start with 20 questions from work whose answers you can check, including 3 difficult cases: a missing document, conflicting versions and a question the available material cannot answer. These numbers define a starting exercise, not a testing standard.
Before each run, record the question, expected answer or acceptable request for help, and supporting source. Afterwards, record the actual result, errors and any action or permission failure. Keep failed cases to test changes again.
Prompt injection attempts to redirect a system through instructions in material it reads. Test with harmless information. Check what the product reads, attempts and blocks. The EchoLeak example is a historical, patched vulnerability; it is not a claim about an ongoing customer breach.
Match a proposed change to the problem
An assistant can acknowledge the same customer message using different acceptable wording. Temperature changes how strongly selection favours likely next tokens. Top-p limits the group of tokens available for selection, giving another way to narrow or widen possible wording choices.
Parameters are learned numerical values that work together in the model’s calculations. Training adjusts them using examples. Further training of a suitable existing model with selected examples is fine-tuning. Approved customer replies can help teach a recurring style when ordinary instructions and examples have not worked well enough.
Generation settings affect selection during an answer; further training changes learned values. Available controls depend on the model and application, and a reply about an order still needs current order information.
Building and running the workflow
Cloud services supply remote computing and storage. Frameworks such as LangChain and CrewAI provide reusable building components. Visual tools such as n8n, Zapier and Make help arrange connected steps. These methods can be combined, and Claude Code or Codex can help build from requirements.
Deployment makes the software available where it will run. Agree who supplies access, pays running costs, notices failures and maintains the service.
Bring the section together
Compare advertised support capabilities using one concrete request, such as cancelling order 24. The assistant needs the shop’s rule and the order’s current status. Ask whether the model chooses the steps or software follows a fixed sequence.
A drafted reply does not cancel an order. If a service promises cancellation after approval, test that action and inspect the updated order status. For continuous service, ask where it runs and who handles a failed connection.
On Your Page, use “Approval and evidence” in Section 4 to extend your agent example from Section 3. Add an action that should wait for your approval and the evidence that would confirm it was completed.