chapter six
6 Building our question engine
This chapter covers
- Creating new sessions in our application.
- Adding backend functionality in Flask.
- Using Tabnine to create new features in code.
- Crafting prompts to troubleshoot errors.
- Creating a dialog with a chat-based interface.
In the last chapter we built a solid foundation for our application using BlackboxAI, and it did a great job. In this chapter we’ll flesh out more functionality with our application and lean heavier on Tabnine to help us out. Let’s look at our overall progress. If we reference our user stories, here’s what we’ve completed so far:
- User Story 1: As a Developer, I want to create a Question Pool Database.
- Task 1.1: Choose an appropriate database technology (SQL or NoSQL) based on the structure and volume of data.
- Task 1.2: Design a table/collection with fields: question_id, question_text, options, and correct_option.
- User Story 2: As a Developer, I want to implement a Question Selector.
- Task 2.1: Develop a module to randomly select 35 questions from the Question Pool Database for each test.
- Task 2.2: Implement an algorithm to ensure true randomness in question selection and prevent the same question from appearing more than once in a single test.
- Task 2.3: Test the module for randomness and ensure no repetitions of questions within a single test.
Before we can create a cohesive UI, we need to complete some work on the backend. We have the following objectives to think about.