Skip to content

Add comprehensive Vectara Chat tutorial - #1069

Open
Furox-Art wants to merge 1 commit into
lablab-ai:mainfrom
Furox-Art:tutorial/vectara-chat
Open

Furox-Art wants to merge 1 commit into
lablab-ai:mainfrom
Furox-Art:tutorial/vectara-chat

Conversation

@Furox-Art

Copy link
Copy Markdown

Summary

This PR adds a comprehensive, hands-on tutorial for Vectara Chat for bounty issue #462. It teaches readers how to build a complete grounded chat experience with Vectara in Python, written in the first-person tutorial style used across the repo.

File: tutorials/en/vectara-chat-tutorial-build-a-grounded-chatbot-with-citations-in-python.mdx (~2,800 words)

What the tutorial covers

Following the structure recommended in the issue:

  • Introduction to Vectara Chat — grounded generation (RAG), numbered citations [1], conversation memory, and the factual consistency score; links to the required Vectara Beginner App Tutorial and Vectara Advanced App Tutorial
  • Getting Started with Vectara Chat — account + personal API key via the Console, VECTARA_API_KEY environment variable, virtualenv, pip install vectara, and creating a first corpus with client.corpora.create
  • Building a Chatbot with Vectara — ingestion with CoreDocument / client.upload.file (PDFs), single-shot grounded Q&A with client.query, printing [1]-style citations mapped to search_results, and multi-turn memory with create_chat_session + ChatParameters(store=True)
  • Enhancing Chatbot Intelligencelexical_interpolation, context_configuration, reranking (CustomerSpecificReranker), response_language (ISO 639-3), max_used_search_results, max_response_characters, generation_preset_name (Mockingbird), CitationParameters, factual consistency gating, and streaming with query_stream
  • Deploying and Testing Chatbots — a complete runnable Streamlit app.py using the chat session, three concrete test cases (grounded / follow-up / out-of-scope), and deployment with requirements.txt + Streamlit Community Cloud
  • Conclusion and Tips for Hackathon Participants — recap, use-case ideas, and practical tips (show citations, protect API keys)

How API accuracy was verified

All code and parameters were checked against official, current sources before writing:

Additionally, every SDK class, field name, and method signature used in the tutorial (SearchCorporaParameters, KeyedSearchCorpus, ContextConfiguration, CustomerSpecificReranker, GenerationParameters, CitationParameters, ChatParameters, QueryFullResponse.summary/search_results/factual_consistency_score, CreateTurnsChatsResponse.chat_id/answer/turn_id, client.query, client.query_stream, client.create_chat_session, session.chat, client.corpora.create, client.documents.create, client.upload.file) was verified against the installed SDK v0.4.3 locally, so all samples are runnable as written.

Note: this tutorial intentionally uses the current v2 API / official Python SDK, which differentiates it from the existing vectara-chat-essentials tutorial in this repo that uses the older v1 request style.

/claim #462

Disclosure: This PR was authored by @Furox-Art (AI-assisted). Happy to adjust anything.

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.

1 participant