Thesis writing: context or literature review? I am currently attempting to write up my doctoral thesis, which covers a couple of domains. It's heavily involved in farming data, but the PhD itself is in computer science. Naturally I start the thesis with the introduction, which talks about the problem definition etc. However, the following step is proving problematic.

It seems typical for a literature review to come after the introduction, but a literature review of... what? In order to ground the research the context must be discussed, and the research surrounding that context. This seems particularly important when the examiners are unlikely to be familiar with the farming context that the research is based. However, this leaves me with a structural problem. It seems odd to go from talking about terms relating to dairy farming, and research about cattle, to talking about particular algorithms.

Moving from one domain to an entirely different one within the same chapter seems conceptually jarring. "... and that concludes the discussion on milk yields. Machine learning has a lot of uses in industrial fields and the focus of much current research...."

I haven't heard of a separate chapter for research context and literature reviews on techniques though... is this something which is "done"?
I was bothered by that as well when I wrote both my MSc thesis and my PhD dissertation. I get the impression that it is considered acceptable to have a selection of unrelated topics in the literature review without any context to tie them together. The reader will see the context for a topic when it is referenced later in your thesis. At least, many of the theses and dissertations I read were structured like that.

However, I myself was not happy with this approach. The problem was especially bothersome to me, because my dissertation pulled together ideas from a broad range of disciplines. So here are some of the techniques I used to "set the stage". These are just ideas; you don't need to do all of these.


In the introduction, include a few sentences mentioning that you will be drawing on ideas from fields X, Y, and Z. 
Include a topic map that illustrates how the ideas relate to each other. Below is an example from my MSc thesis. My advisors were a little wary of this "weird diagram" at first, but they warmed to it. Later they asked for a similar diagram in my PhD thesis.
Try to arrange the topics in your literature review in some sort of logical order, and add sentences that provide a segue from one topic to the next. For example, at the end of a section on cognition and before a section on evolution, I wrote "The next section presents a framework for analysing cognition within the context of evolution."